implement some APIs needed for OctoDroid

This commit is contained in:
Julian Winkler
2024-03-29 23:56:28 +01:00
parent 0352a307b9
commit 2f4cd3917f
36 changed files with 329 additions and 25 deletions

View File

@@ -60,7 +60,10 @@ public class Drawable {
}
public void setBounds(int left, int top, int right, int bottom) {
boolean changed = left != mBounds.left || top != mBounds.top || right != mBounds.right || bottom != mBounds.bottom;
mBounds.set(left, top, right, bottom);
if (changed)
onBoundsChange(mBounds);
}
public final Rect getBounds() {
@@ -206,6 +209,8 @@ public class Drawable {
bounds.set(mBounds);
}
protected void onBoundsChange(Rect bounds) {}
protected static native long native_paintable_from_path(String path);
protected native long native_constructor();
}

View File

@@ -1,4 +1,10 @@
package android.graphics.drawable.shapes;
import android.graphics.RectF;
public class Shape {
protected RectF rect() {
return new RectF();
}
}