mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
27 lines
856 B
Java
27 lines
856 B
Java
|
package com.google.android.material.animation;
|
||
|
|
||
|
import android.graphics.drawable.Drawable;
|
||
|
import android.util.Property;
|
||
|
import java.util.WeakHashMap;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public class DrawableAlphaProperty extends Property<Drawable, Integer> {
|
||
|
public static final Property<Drawable, Integer> DRAWABLE_ALPHA_COMPAT = new DrawableAlphaProperty();
|
||
|
private final WeakHashMap<Drawable, Integer> alphaCache;
|
||
|
|
||
|
private DrawableAlphaProperty() {
|
||
|
super(Integer.class, "drawableAlphaCompat");
|
||
|
this.alphaCache = new WeakHashMap<>();
|
||
|
}
|
||
|
|
||
|
@Override // android.util.Property
|
||
|
public Integer get(Drawable drawable) {
|
||
|
return Integer.valueOf(drawable.getAlpha());
|
||
|
}
|
||
|
|
||
|
@Override // android.util.Property
|
||
|
public void set(Drawable drawable, Integer num) {
|
||
|
drawable.setAlpha(num.intValue());
|
||
|
}
|
||
|
}
|