user2121 user2121 - 4 months ago 34
Android Question

how to customize an image view and textview?

i have a listview and the row model/design should be something as shown in the image below.

My question is, how can I design a view to appear as shown in the image in the the third row?? I want to design something like the blue rectangular shape with round corners and then write the value on it as shown in the image

Is it a textview or imageView? Please advice how can i design such a view.


enter image description here


You must create a TextView and give it a Shape:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="" >         
      android:color="@color/common_border_color" />

  <solid android:color="replace with blue color" />

       android:top="1dp" />

  <corners android:radius="5dp" />

Make this in an xml called rounded_corner.xml in the drawable folder.