How to center&left&right align the ActionBar icons in Android

后端 未结 1 688
孤独总比滥情好
孤独总比滥情好 2021-01-17 16:57

hi there I want align a set of icons in toolbar like below picture.

I googled and after some change I have:

mainActivity.xml

...



        
1条回答
  •  执念已碎
    2021-01-17 17:43

    This answer might be a bit late. However, using today's current material components library you can use a bottom app bar to achieve your desired result. See pseudo code snippet:

    
    
        
    
            
    
                
    
                
    
                
    
                
    
                
    
                
            
        
    
    

    android:drawableTop="@drawable/ic_blur" would be used to represent the icons that you want to have displayed in the bottom app bar.

    You would have to import the material components library for you to use the bottom app bar

    0 讨论(0)
提交回复
热议问题