Improve wallpaper full preview page TB UX
- From ag/11910869 (b/157871987), we only control full preview page tab's a11y param, since ag/12067604 changed category/wallpaper list's TB behavior, make full preview page's wallpaper preview pager apply same behavior when bottom sheet expanded (although only a little part be blocked, but once info sheet become bigger, like switch language, the result will similar to ag/11910869)
video: https://drive.google.com/file/d/1w0nmnwACRvbEEIUaNqQrYIzLN9IQkytG/view?usp=sharing
Bug: 160284173
Test: manually
Change-Id: I30807e11914545b2c0d013a18e8fa7904bd04418
diff --git a/src/com/android/wallpaper/picker/ImagePreviewFragment.java b/src/com/android/wallpaper/picker/ImagePreviewFragment.java
index 8e5c6bb..037a95e 100755
--- a/src/com/android/wallpaper/picker/ImagePreviewFragment.java
+++ b/src/com/android/wallpaper/picker/ImagePreviewFragment.java
@@ -218,11 +218,14 @@
mBottomActionBar.setAccessibilityCallback(new AccessibilityCallback() {
@Override
public void onBottomSheetCollapsed() {
+ mContainer.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
mTabs.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
}
@Override
public void onBottomSheetExpanded() {
+ mContainer.setImportantForAccessibility(
+ View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
mTabs.setImportantForAccessibility(
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
}
diff --git a/src/com/android/wallpaper/picker/LivePreviewFragment.java b/src/com/android/wallpaper/picker/LivePreviewFragment.java
index 172c5ad..b0449f7 100644
--- a/src/com/android/wallpaper/picker/LivePreviewFragment.java
+++ b/src/com/android/wallpaper/picker/LivePreviewFragment.java
@@ -360,11 +360,15 @@
mBottomActionBar.setAccessibilityCallback(new AccessibilityCallback() {
@Override
public void onBottomSheetCollapsed() {
+ mPreviewContainer.setImportantForAccessibility(
+ View.IMPORTANT_FOR_ACCESSIBILITY_YES);
mTab.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
}
@Override
public void onBottomSheetExpanded() {
+ mPreviewContainer.setImportantForAccessibility(
+ View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
mTab.setImportantForAccessibility(
View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
}