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
add bunch of new java APIs: mostly stubs or copied from AOSP
Many of these classes are only needed to be subclassed by androidx support library, which is used in many android apps
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
package android.graphics.drawable;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.Rect;
|
||||
|
||||
public abstract class Drawable {
|
||||
public static interface Callback {}
|
||||
|
||||
private Rect mBounds = new Rect();
|
||||
private int[] mStateSet = new int[0];
|
||||
|
||||
public int getChangingConfigurations() {
|
||||
return 0;
|
||||
@@ -14,11 +18,12 @@ public abstract class Drawable {
|
||||
public void setChangingConfigurations(int bitmap) {}
|
||||
|
||||
public ConstantState getConstantState() {
|
||||
return new ConstantState();
|
||||
return null;
|
||||
}
|
||||
|
||||
public class ConstantState {
|
||||
|
||||
public abstract class ConstantState {
|
||||
|
||||
public abstract Drawable newDrawable(Resources res);
|
||||
}
|
||||
|
||||
public void setBounds(int left, int top, int right, int bottom) {
|
||||
@@ -30,4 +35,38 @@ public abstract class Drawable {
|
||||
}
|
||||
|
||||
public abstract void draw(Canvas canvas);
|
||||
|
||||
public boolean setState(int[] stateSet) {
|
||||
this.mStateSet = stateSet;
|
||||
return false;
|
||||
}
|
||||
|
||||
public int[] getState() {
|
||||
return mStateSet;
|
||||
}
|
||||
|
||||
public void invalidateSelf() {}
|
||||
|
||||
public void setCallback(Callback callback) {}
|
||||
|
||||
public boolean isVisible() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean setVisible (boolean visible, boolean restart) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void clearColorFilter() {}
|
||||
|
||||
public final int getLevel() {return 0;}
|
||||
public final boolean setLevel(int level) {return false;}
|
||||
|
||||
public void setBounds(Rect bounds) {}
|
||||
|
||||
public void setColorFilter(int color, PorterDuff.Mode mode) {}
|
||||
|
||||
public Drawable mutate() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user