How to implement new material BottomAppBar as BottomNavigationView

前端 未结 6 1195
温柔的废话
温柔的废话 2020-12-30 03:52

I was trying to implement the new BottomAppBar that usually looks like this: material BottomAppBar as a BottomNavigationView like in the Google home app that looks like this

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-30 04:30

    SOLVED

    Basically, instead of trying to force the menu resources to the layout that i needed, i used this solution instead, i just put a LinearLayout inside the BottomAppBar using the "empty" element as @dglozano suggested.

    Using ?attr/selectableItemBackgroundBorderless i'm also able to achieve an effect that is really similar to the BottomNavigationView.

    
    
        
            
            
            
            
            
        
    
    

提交回复
热议问题