How to assign padding to Listview item divider line

后端 未结 6 1894
眼角桃花
眼角桃花 2020-12-07 10:31

\"enter

How can i give padding to list item as i show in image. I want to make the div

6条回答
  •  孤街浪徒
    2020-12-07 11:11

    Use 'inset'.....

    (list_divider.xml)

    
    
    
     
        
        
    
    
    
    

    and in your list view add like this...

    
    

    you can set the inset value as desired...

    UPDATE

    As pointed out by @Giulio Piancastelli , If the background of list container is different from background of list item then you may use 'layer-list'...

    (list_divider.xml)

      
        
       
            
                
            
        
    
    
        
            
                
            
        
    
            
    

    and in your list view add like this...

    
    

提交回复
热议问题