transparent Actionbar with AppCompat-v7 21

后端 未结 4 2074
借酒劲吻你
借酒劲吻你 2020-12-01 09:42

Is there a way to make the ActionBar transparent in Material Design via Appcompat-v7 21? This is not working unfortunately.

  

        
4条回答
  •  一向
    一向 (楼主)
    2020-12-01 10:15

    Actually, it's quite easy and simple.

    1. Just ensure that you use RelativeLayout to lay Toolbar and the body.
    2. Put the Toolbar in the last.
    3. Put transparent color for android:background attribute of the Toolbar

    This is an example of a working code:

    
    
    
        
    
        
    
    
    

    Hope it answers the question.

提交回复
热议问题