How to set an icon at the end of Toolbar

后端 未结 5 1451
醉酒成梦
醉酒成梦 2021-01-17 08:36

I want to set an icon at the the end of my Toolbar,which start another activity. My Toolbar portion

 

        
5条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-17 08:58

    If there's anyone that still confused (including me before), somehow android studio doesn't provide autocomplete for the android:layout_gravity under the toolbar tag. So to make it works, just copy and paste android:layout_gravity="end" to the ImageView/layout.

提交回复
热议问题