Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d53e689d authored by Peter_Liang's avatar Peter_Liang
Browse files

Fix the bounds of the illustration view is larger than the background

view in a foldable device.

Actions:
1) Restrict the bounds of view.
2) Fix the background view of illustrationPreference was not centered in a foldable device.

Bug: 201254287
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=com.android.settingslib.widget.IllustrationPreferenceTest
Change-Id: Id714e0a578dc0440a24ede43a2a38e1258058248
parent f7f93694
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -36,15 +36,18 @@
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:scaleType="centerInside"
            android:layout_gravity="center"
            android:adjustViewBounds="true"
            android:src="@drawable/protection_background"/>

        <com.airbnb.lottie.LottieAnimationView
            android:id="@+id/lottie_view"
            android:adjustViewBounds="true"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center" />
            android:layout_gravity="center"
            android:maxWidth="@dimen/settingslib_illustration_width"
            android:maxHeight="@dimen/settingslib_illustration_height"
            android:adjustViewBounds="true"/>

        <FrameLayout
            android:id="@+id/middleground_layout"