Merge changes from topic "a11y_image_preference_bc" into sc-dev

* changes:
  Update the Lottie images for Accessibility features.
  Update the material next style for AnimatedImagePreference.
This commit is contained in:
PETER LIANG
2021-06-14 02:55:07 +00:00
committed by Android (Google) Code Review
7 changed files with 8632 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

View File

@@ -15,30 +15,31 @@
limitations under the License.
-->
<FrameLayout
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:layout_height="@dimen/settingslib_illustration_height"
android:gravity="center"
android:padding="@dimen/settingslib_illustration_padding"
android:orientation="vertical"
android:importantForAccessibility="noHideDescendants">
<ImageView
android:id="@+id/animated_img"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:maxWidth="@dimen/settingslib_illustration_width"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/protection_background"
android:scaleType="fitCenter"
android:focusable="false"
android:clickable="false"
android:adjustViewBounds="true"/>
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lottie_view"
android:layout_width="412dp"
android:layout_height="300dp"
android:layout_gravity="center"
android:maxWidth="@dimen/settingslib_illustration_width"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/protection_background"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:clipToOutline="true"/>
</FrameLayout>
</LinearLayout>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -80,7 +80,7 @@ public class ToggleColorInversionPreferenceFragment extends
mHtmlDescription = getText(R.string.accessibility_display_inversion_preference_subtitle);
mImageUri = new Uri.Builder().scheme(ContentResolver.SCHEME_ANDROID_RESOURCE)
.authority(getPrefContext().getPackageName())
.appendPath(String.valueOf(R.drawable.accessibility_color_inversion_banner))
.appendPath(String.valueOf(R.raw.accessibility_color_inversion_banner))
.build();
final List<String> enableServiceFeatureKeys = new ArrayList<>(/* initialCapacity= */ 1);
enableServiceFeatureKeys.add(ENABLED);

View File

@@ -89,7 +89,7 @@ public class ToggleScreenMagnificationPreferenceFragment extends
mPackageName = getString(R.string.accessibility_screen_magnification_title);
mImageUri = new Uri.Builder().scheme(ContentResolver.SCHEME_ANDROID_RESOURCE)
.authority(getPrefContext().getPackageName())
.appendPath(String.valueOf(R.drawable.accessibility_magnification_banner))
.appendPath(String.valueOf(R.raw.accessibility_magnification_banner))
.build();
mTouchExplorationStateChangeListener = isTouchExplorationEnabled -> {
removeDialog(DialogEnums.EDIT_SHORTCUT);