How to show the shadow of the ActionBar&Toolbar of the support library on all Android versions?

后端 未结 2 473
旧巷少年郎
旧巷少年郎 2020-12-08 11:22

This is a simple question:

I use the new support library, which allows me to have a Toolbar instance and even set it as the actionBar of the activity (or use the def

2条回答
  •  旧巷少年郎
    2020-12-08 12:03

    This is what I have done in one of my apps, it's showing shadow (artificial shadow) :

    
    
          
    
            
            
    
          
    
          
          
    
            
    
               ....
    
                            
    
               ....
    
               
              
    
            
         
    
    
     
    

    toolbar_dropshadow.xml :

    
    
        
            
        
    
    
    

    I am using a map activity and all this is showing wonderful shadow on my map view.

    Hope this helps...

提交回复
热议问题