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 ShapeDrawable as constant color
This commit is contained in:
@@ -1,17 +1,29 @@
|
|||||||
package android.graphics.drawable;
|
package android.graphics.drawable;
|
||||||
|
|
||||||
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.graphics.drawable.shapes.Shape;
|
import android.graphics.drawable.shapes.Shape;
|
||||||
|
|
||||||
public class ShapeDrawable extends Drawable {
|
public class ShapeDrawable extends Drawable {
|
||||||
|
|
||||||
|
private Paint paint = new Paint();
|
||||||
|
|
||||||
|
public ShapeDrawable() {}
|
||||||
|
|
||||||
public ShapeDrawable(Shape shape) {}
|
public ShapeDrawable(Shape shape) {}
|
||||||
|
|
||||||
public Paint getPaint() {return new Paint();}
|
public Paint getPaint() {
|
||||||
|
return paint;
|
||||||
|
}
|
||||||
|
|
||||||
public void setPadding(Rect padding) {}
|
public void setPadding(Rect padding) {}
|
||||||
|
|
||||||
public void setShape(Shape shape) {}
|
public void setShape(Shape shape) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(Canvas canvas) {
|
||||||
|
canvas.drawRect(getBounds(), paint);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user