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

后端 未结 24 2890
盖世英雄少女心
盖世英雄少女心 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:28

    I've used a trick so that the border is displayed outside the container. With this trick only a line is drawn so the background will be shown of the underlying view.

    
    
        
            
                
    
                
    
                
            
        
    
    
    

提交回复
热议问题