Fix Talkback didn't speak "double-tap to activate" when focus on the "style preview" in "custom style name" page.
Reason: The card view which Talkback focused on is not clickable.
Solution: Set the click listener on this card view instead of its child view. (Like what we did in ThemeFragment and GridFragment)
Result video: https://drive.google.com/file/d/1bCDhjEIPiSc67O4r_Lu_nCcm7iberD-S/view?usp=sharing&resourcekey=0-7KHLTpmlYWvPygN7w4oyNg
Bug: 178355698
Test: Use Talkback to focus on the "style preview" in "custom style name" page. It should speak "double-tap to activate" now.
Change-Id: If4842fdfbae1bbd80b3ad05d1648d71a7a544515
diff --git a/src/com/android/customization/picker/theme/CustomThemeNameFragment.java b/src/com/android/customization/picker/theme/CustomThemeNameFragment.java
index 9929ccf..067dfbc 100644
--- a/src/com/android/customization/picker/theme/CustomThemeNameFragment.java
+++ b/src/com/android/customization/picker/theme/CustomThemeNameFragment.java
@@ -84,7 +84,6 @@
// Set theme option.
ViewGroup previewContainer = view.findViewById(R.id.theme_preview_container);
- previewContainer.setOnClickListener(v -> showFullPreview());
mThemeOptionPreviewer = new ThemeOptionPreviewer(getLifecycle(), getContext(),
previewContainer);
PreviewInfo previewInfo = mCustomThemeManager.buildCustomThemePreviewInfo(getContext());
@@ -107,6 +106,8 @@
// Set theme default name.
mNameEditor = view.findViewById(R.id.custom_theme_name);
mNameEditor.setText(getOriginalThemeName());
+
+ view.findViewById(R.id.theme_preview_card).setOnClickListener(v -> showFullPreview());
return view;
}