Android table with round border

前端 未结 3 1903
忘了有多久
忘了有多久 2021-01-30 11:22

How can I make a table with a round border, similar to the photo below, in Android?

\"Round-bordered

3条回答
  •  孤街浪徒
    2021-01-30 11:48

    I think Androidbase linked to the wrong question... he asked a similar question recently, and here's the answer I gave him:

    You can put a coloured background with rounded corners into a table by using a Shape background. Create such a shape in an XML file, put in your drawables folder.

    
    
        
        
         
    
    

    For example the above creates a semi-transparent white background with 30px rounded corners. You set this to the table by using

    android:background="@drawable/my_shape_file"
    

    in the XML file where you defined your table layout.

提交回复
热议问题