I need to draw a rounded rectangle in the Android UI. Having the same rounded rectangle for TextView
and EditText
would also be helpful.
I think, this is you exactly needed.
Here drawable(xml) file that creates rounded rectangle. round_rect_shape.xml
Here layout file: my_layout.xml
-> In the above code, LinearLayout having the background(That is the key role to place to create rounded rectangle). So you can place any view like TextView, EditText... in that LinearLayout to see background as round rectangle for all.