Creating an empty Drawable in Android

前端 未结 8 906
陌清茗
陌清茗 2021-02-05 00:15

Creating a Drawable that is completely empty seems like a common need, as a place holder, initial state, etc., but there doesn\'t seem to be a good way to do this... at least in

8条回答
  •  野的像风
    2021-02-05 00:43

    
    

    creates an empty shape and does the trick for me. Or create a file empty_drawable.xml containing:

    
    
    

    so you can use it elsewhere.

    You can also make a shape disappear when the view it is used in is not enabled by creating my_disablable_view.xml:

    
    
        
            
                
                
            
        
        
            
        
     
    

提交回复
热议问题