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

Commit a87a7009 authored by Peter_Liang's avatar Peter_Liang Committed by PETER LIANG
Browse files

Refines the animated image to fit the screen display.

Root cause:
The width and height of animated image are wrap_content. It causes the gif or drawable which are non-transparent background to have a little weird display under dark mode.

Next:
1. Revise the width from wrap_content to match_parent, and add the fit center scale type.
2. Correct the function usage

Bug: 155946967
Test: manual test
Change-Id: I7470efb945a2b3bedb695e1b6f34475c6f190f9d
parent 3a132d7c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -24,9 +24,10 @@

    <ImageView
        android:id="@+id/animated_img"
        android:layout_width="wrap_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:scaleType="fitCenter"
        android:focusable="false"
        android:clickable="false"
        android:adjustViewBounds="true"/>
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ public class AnimatedImagePreference extends Preference {
        }

        if (mMaxHeight > -1) {
            imageView.setMaxWidth(mMaxHeight);
            imageView.setMaxHeight(mMaxHeight);
        }
    }