add more Java APIs needed for OctoDroid

This commit is contained in:
Julian Winkler
2024-08-05 17:17:53 +02:00
parent 6c2585ab4b
commit 3e7fdac663
21 changed files with 184 additions and 5 deletions

View File

@@ -34,6 +34,7 @@ public class Typeface {
public static final int BOLD_ITALIC = 3;
public long skia_typeface = 0;
public long native_instance = 0; // directly accessed by androidx
public static Typeface createFromAsset(AssetManager mgr, String path) {
return DEFAULT;

View File

@@ -22,4 +22,9 @@ public class ColorDrawable extends Drawable {
public void draw(Canvas canvas) {
canvas.drawRect(getBounds(), paint);
}
public void setColor(int color) {
this.color = color;
paint.setColor(color);
}
}

View File

@@ -62,6 +62,8 @@ public class Drawable {
public abstract Drawable newDrawable(Resources res);
public abstract Drawable newDrawable();
public abstract int getChangingConfigurations();
}
public void setBounds(int left, int top, int right, int bottom) {

View File

@@ -0,0 +1,10 @@
package android.graphics.drawable;
public class TransitionDrawable extends Drawable {
public TransitionDrawable(Drawable[] layers) {}
public void setCrossFadeEnabled(boolean enabled) {}
public void startTransition(int duration) {}
}