enable RippleDrawable inflation

This commit is contained in:
Julian Winkler
2025-10-26 16:04:01 +01:00
parent f8a3b31379
commit 448d76ce43
3 changed files with 24 additions and 3 deletions

View File

@@ -248,8 +248,9 @@ public class Drawable {
return new Drawable();
}
case "ripple": {
// FIXME: the non-pressed state of RippleDrawable should be equivalent to this
return new ColorDrawable(0);
RippleDrawable drawable = new RippleDrawable();
drawable.inflate(resources, parser, attrs, theme);
return drawable;
}
case "vector": {
VectorDrawable drawable = new VectorDrawable();
@@ -356,6 +357,8 @@ public class Drawable {
public void setFilterBitmap(boolean filter) {}
public void setHotspotBounds(int left, int top, int right, int bottom) {}
protected static native long native_paintable_from_path(String path);
protected native long native_constructor();
protected native void native_invalidate(long paintable);

View File

@@ -8,6 +8,8 @@ public class RippleDrawable extends LayerDrawable {
super(drawable == null ? new Drawable[] {} : new Drawable[] {drawable});
}
RippleDrawable() {}
public void setColor(ColorStateList colorStateList) {}
public void setRadius(int radius) {}