You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
implement some APIs needed for OctoDroid
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
package android.graphics.drawable.shapes;
|
||||
|
||||
import android.graphics.RectF;
|
||||
|
||||
public class Shape {
|
||||
|
||||
protected RectF rect() {
|
||||
return new RectF();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user