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

Commit 91598903 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Fix overlapping alpha of shade pull down

The brightness slider and media player had overlapping elements that
made the alpha animation janky.

We now avoid it by caching them as a texture.

Test: visual
Bug: 199047412
Change-Id: I65871e9931dec2238fda1dc0aa22ff7830098f96
parent 6665ad79
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ class PlayerViewHolder private constructor(itemView: View) {
         */
        @JvmStatic fun create(inflater: LayoutInflater, parent: ViewGroup): PlayerViewHolder {
            val mediaView = inflater.inflate(R.layout.media_view, parent, false)
            mediaView.setLayerType(View.LAYER_TYPE_HARDWARE, null)
            // Because this media view (a TransitionLayout) is used to measure and layout the views
            // in various states before being attached to its parent, we can't depend on the default
            // LAYOUT_DIRECTION_INHERIT to correctly resolve the ltr direction.
+1 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ public class BrightnessSliderView extends FrameLayout {
    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        setLayerType(LAYER_TYPE_HARDWARE, null);

        mSlider = requireViewById(R.id.slider);
        mSlider.setAccessibilityLabel(getContentDescription().toString());