use of android.graphics.drawable.shapes.OvalShape in project coins-android by bubelov.
the class StaticClusterRenderer method makeClusterBackground.
private LayerDrawable makeClusterBackground() {
mColoredCircleBackground = new ShapeDrawable(new OvalShape());
ShapeDrawable outline = new ShapeDrawable(new OvalShape());
// Transparent white.
outline.getPaint().setColor(Color.WHITE);
LayerDrawable background = new LayerDrawable(new Drawable[] { outline, mColoredCircleBackground });
int strokeWidth = (int) (mDensity * 1.5f);
background.setLayerInset(1, strokeWidth, strokeWidth, strokeWidth, strokeWidth);
return background;
}
use of android.graphics.drawable.shapes.OvalShape in project android_packages_apps_crDroidSettings by crdroidandroid.
the class ColorPickerPreference method createOvalShape.
private static ShapeDrawable createOvalShape(int size, int color) {
ShapeDrawable shape = new ShapeDrawable(new OvalShape());
shape.setIntrinsicHeight(size);
shape.setIntrinsicWidth(size);
shape.getPaint().setColor(color);
return shape;
}
use of android.graphics.drawable.shapes.OvalShape in project android_packages_apps_crDroidSettings by crdroidandroid.
the class FloatingActionButton method createOuterStrokeDrawable.
private Drawable createOuterStrokeDrawable(float strokeWidth) {
ShapeDrawable shapeDrawable = new ShapeDrawable(new OvalShape());
final Paint paint = shapeDrawable.getPaint();
paint.setAntiAlias(true);
paint.setStrokeWidth(strokeWidth);
paint.setStyle(Style.STROKE);
paint.setColor(Color.BLACK);
paint.setAlpha(opacityToAlpha(0.02f));
return shapeDrawable;
}
Aggregations