Im trying to draw a smaller circle within another circle. It seems pretty simple but Im having trouble with this and couldnt find an answer. The code im using is:
Change the order,
Drawable[] d = {smallerCircle,biggerCircle};
LayerDrawable composite1 = new LayerDrawable(d);
try like this
ShapeDrawable biggerCircle= new ShapeDrawable( new OvalShape());
biggerCircle.setIntrinsicHeight( 60 );
biggerCircle.setIntrinsicWidth( 60);
biggerCircle.setBounds(new Rect(0, 0, 60, 60));
biggerCircle.getPaint().setColor(Color.BLUE);
ShapeDrawable smallerCircle= new ShapeDrawable( new OvalShape());
smallerCircle.setIntrinsicHeight( 10 );
smallerCircle.setIntrinsicWidth( 10);
smallerCircle.setBounds(new Rect(0, 0, 10, 10));
smallerCircle.getPaint().setColor(Color.BLACK);
smallerCircle.setPadding(50,50,50,50);
Drawable[] d = {smallerCircle,biggerCircle};
LayerDrawable composite1 = new LayerDrawable(d);
btn.setBackgroundDrawable(composite1);