Shape drawable as background, a line at the bottom

前端 未结 7 1284
旧时难觅i
旧时难觅i 2020-12-07 11:58

I am using a drawable as a background of a TextView just to have a divider line below the text. A achivied it with this drawable-xml:



        
7条回答
  •  执笔经年
    2020-12-07 13:00

    In general, I try to mess as little as possible with backgrounds unless absolutely necessary, since doing so overrides the default background colors that have states for focused, pressed, etc. I suggest just using an additional view (in a vertical LinearLayout) that is as thick as you need it to be. For example:

     
    

提交回复
热议问题