2023-07-25 14:29:43 +02:00
|
|
|
package android.graphics.drawable;
|
|
|
|
|
2023-09-12 23:18:47 +02:00
|
|
|
import android.content.res.ColorStateList;
|
2023-08-17 10:46:24 +02:00
|
|
|
import android.content.res.Resources;
|
2023-08-06 14:27:30 +02:00
|
|
|
import android.graphics.Canvas;
|
2023-08-22 14:41:01 +02:00
|
|
|
import android.graphics.ColorFilter;
|
2023-08-17 10:46:24 +02:00
|
|
|
import android.graphics.PorterDuff;
|
2023-08-06 14:27:30 +02:00
|
|
|
import android.graphics.Rect;
|
2023-07-25 14:29:43 +02:00
|
|
|
|
2023-08-06 14:27:30 +02:00
|
|
|
public abstract class Drawable {
|
2023-08-17 10:46:24 +02:00
|
|
|
public static interface Callback {}
|
2023-08-06 14:27:30 +02:00
|
|
|
|
|
|
|
private Rect mBounds = new Rect();
|
2023-08-17 10:46:24 +02:00
|
|
|
private int[] mStateSet = new int[0];
|
2023-08-06 14:27:30 +02:00
|
|
|
|
|
|
|
public int getChangingConfigurations() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setChangingConfigurations(int bitmap) {}
|
|
|
|
|
|
|
|
public ConstantState getConstantState() {
|
2023-08-17 10:46:24 +02:00
|
|
|
return null;
|
2023-08-06 14:27:30 +02:00
|
|
|
}
|
|
|
|
|
2023-08-17 10:46:24 +02:00
|
|
|
public abstract class ConstantState {
|
|
|
|
|
2023-09-01 12:55:04 +02:00
|
|
|
public abstract Drawable newDrawable(Resources res);
|
|
|
|
|
|
|
|
public abstract Drawable newDrawable();
|
2023-08-06 14:27:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setBounds(int left, int top, int right, int bottom) {
|
|
|
|
mBounds.set(left, top, right, bottom);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Rect getBounds() {
|
|
|
|
return mBounds;
|
|
|
|
}
|
|
|
|
|
|
|
|
public abstract void draw(Canvas canvas);
|
2023-08-17 10:46:24 +02:00
|
|
|
|
|
|
|
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) {}
|
2023-08-22 14:41:01 +02:00
|
|
|
public void setColorFilter(ColorFilter filter) {}
|
2023-08-17 10:46:24 +02:00
|
|
|
|
|
|
|
public Drawable mutate() {
|
|
|
|
return this;
|
|
|
|
}
|
2023-08-22 14:41:01 +02:00
|
|
|
|
|
|
|
public int getIntrinsicWidth() {return 0;}
|
|
|
|
public int getIntrinsicHeight() {return 0;}
|
2023-09-12 23:18:47 +02:00
|
|
|
|
|
|
|
public void setTintList (ColorStateList tint) {}
|
2023-11-08 21:40:39 +01:00
|
|
|
|
|
|
|
public void setTint(int tint) {}
|
|
|
|
|
|
|
|
public boolean isStateful() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTintMode(PorterDuff.Mode tintMode) {}
|
2023-12-29 11:09:37 +01:00
|
|
|
|
|
|
|
public boolean isProjected () {return false;}
|
2023-07-25 14:29:43 +02:00
|
|
|
}
|