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.