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

Commit 77e1f7a2 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Ensure scroll assets are drawn with correct opacity" into lmp-mr1-dev

parents 16cfa8dd 03748a57
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@ import android.graphics.drawable.Drawable;
 * {@hide}
 */
public class ScrollBarDrawable extends Drawable {
    private static final int[] STATE_ENABLED = new int[] { android.R.attr.state_enabled };

    private Drawable mVerticalTrack;
    private Drawable mHorizontalTrack;
    private Drawable mVerticalThumb;
@@ -189,21 +191,29 @@ public class ScrollBarDrawable extends Drawable {

    public void setVerticalThumbDrawable(Drawable thumb) {
        if (thumb != null) {
            thumb.setState(STATE_ENABLED);
            mVerticalThumb = thumb;
        }
    }

    public void setVerticalTrackDrawable(Drawable track) {
        if (track != null) {
            track.setState(STATE_ENABLED);
        }
        mVerticalTrack = track;
    }

    public void setHorizontalThumbDrawable(Drawable thumb) {
        if (thumb != null) {
            thumb.setState(STATE_ENABLED);
            mHorizontalThumb = thumb;
        }
    }

    public void setHorizontalTrackDrawable(Drawable track) {
        if (track != null) {
            track.setState(STATE_ENABLED);
        }
        mHorizontalTrack = track;
    }

+1 −1
Original line number Diff line number Diff line
@@ -17,6 +17,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:tint="?attr/colorControlNormal"
       android:shape="rectangle">
    <solid android:color="#21ffffff" />
    <solid android:color="#39ffffff" />
    <size android:width="8dp" />
</shape>