Android: defining border drawables in xml

The following border can apply to TextView, LinearLayout, RelativeLayout, or any other views by setting the background to those drawable xml files. android:background="@drawable/border_bottom"

Top Border

drawable/border_top.xml


    
        
            
        
    


Bottom Border

drawable/border_bottom.xml


    
        
            
        
    


Left Border

drawable/border_left.xml


    
        
            
        
    


Right Border

drawable/border_right.xml


    
        
            
        
    


Full Border

drawable/border_right.xml


    
        
            
        
    

Complete example in Github

Search within Codexpedia

Custom Search

Search the entire web

Custom Search