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
multiple additions and fixes for the Java APIs
Stuff needed for WhatsApp support
This commit is contained in:
@@ -76,8 +76,13 @@ public class Drawable {
|
||||
}
|
||||
|
||||
public void draw(Canvas canvas) {
|
||||
if (canvas instanceof GskCanvas)
|
||||
if (canvas instanceof GskCanvas) {
|
||||
if (mBounds.left != 0 || mBounds.top != 0)
|
||||
canvas.translate(mBounds.left, mBounds.top);
|
||||
native_draw(paintable, ((GskCanvas)canvas).snapshot, mBounds.width(), mBounds.height());
|
||||
if (mBounds.left != 0 || mBounds.top != 0)
|
||||
canvas.translate(-mBounds.left, -mBounds.top);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean setState(int[] stateSet) {
|
||||
@@ -145,8 +150,8 @@ public class Drawable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIntrinsicWidth() {return 0;}
|
||||
public int getIntrinsicHeight() {return 0;}
|
||||
public int getIntrinsicWidth() {return 24;}
|
||||
public int getIntrinsicHeight() {return 24;}
|
||||
|
||||
public void setTintList(ColorStateList tint) {}
|
||||
|
||||
@@ -263,6 +268,10 @@ public class Drawable {
|
||||
|
||||
public void jumpToCurrentState() {}
|
||||
|
||||
public boolean setLayoutDirection(int layoutDirection) {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected static native long native_paintable_from_path(String path);
|
||||
protected native long native_constructor();
|
||||
protected native void native_invalidate(long paintable);
|
||||
|
||||
Reference in New Issue
Block a user