Set border and background color of textView

后端 未结 2 436
难免孤独
难免孤独 2020-12-30 05:21

I have a TextView defined in XML and i would like to set background color AND border to it. Problem i have is that in XML i already use android:background for s

2条回答
  •  粉色の甜心
    2020-12-30 05:46

    You should create a XML drawable for this, which can then be set as your single background. Here is what you are wanting (a rectangle with a different color border - replace gradient with if you don't want that).

    This will go in your 'drawable' folder:

    
    
        
         
    
    

提交回复
热议问题