How to add a separator between menu items in ActionBar likewise it's made in Gmail app?
Well when I was trying to make my own action bar I used a black FrameLayout in which all the items of the action bar will be displayed. I set the layout_margin attribute on each item at 1dp so it would appear like there was a black separator on either side - if you want it to be larger you can increase the margin.
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#000000">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageButton ....... />
<ImageButton ...... android:layout_marginLeft="1dp"/> <!-- this will be shown as a separator-->
</LinearLayout>
</FrameLayout>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With