Android TextView Background

后端 未结 3 653
滥情空心
滥情空心 2021-02-01 19:31

i have a design which demands a background like the image below for the number on the right hand side. Is there any we can achieve this in Android ?

3条回答
  •  梦毁少年i
    2021-02-01 20:15

    First, create a shape to have rounded corners.

    
    
        
        
         
    
    

    Then apply this as the background to your Views:

    
        
    
    

    You may need to do some tweaking. You may even be able to discard the LinearLayout and set the android:background of the TextView to @drawable/rounded_edges

提交回复
热议问题