Android Draw Custom Shape

422 Views Asked by At

I am new to android, can you please guide how I can draw following shape in android? I will appreciate any help. Thanks.enter image description here

1

There are 1 best solutions below

0
Damanpreet Singh On BEST ANSWER
public class CustomView extends View{

   public onDraw(Canvas canvas){
     // Take paint object
      Paint fillBackgroundPaint = new Paint();
      fillBackgroundPaint.setColor(ContextCompat.getColor(context, R.color.black));

      // Draw lines and Rectangles by using the below methods on canvas
      canvas.drawLine()
      canvas.drawRect()

     }
   }