Rounded corner for textview in android

前端 未结 11 1144
猫巷女王i
猫巷女王i 2020-12-02 04:30

I have a textview and want its corner to be in round shape. I already know it can be done using android:background=\"@drawable/somefile\". In my case, this tag

11条回答
  •  無奈伤痛
    2020-12-02 04:43

    1. Create rounded_corner.xml in the drawable folder and add the following content,

      
      
      
      
      
      
    2. Set this drawable in the TextView background property like so:

      android:background="@drawable/rounded_corner"
      

    I hope this is useful for you.

提交回复
热议问题