Is there an easy way to add a border to the top and bottom of an Android View?

后端 未结 24 2433
盖世英雄少女心
盖世英雄少女心 2020-11-22 13:36

I have a TextView and I\'d like to add a black border along its top and bottom borders. I tried adding android:drawableTop and android:drawableBottom

24条回答
  •  情话喂你
    2020-11-22 14:19

    Try wrapping the image with a linearlayout, and set it's background to the border color you want around the text. Then set the padding on the textview to be the thickness you want for your border.

提交回复
热议问题