Well, when I tried to create my own action bar, I used a black FrameLayout, which will display all the elements of the action bar. I set the layout_margin attribute for each element in 1dp so that it looks like there is a black separator on each 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"/> </LinearLayout> </FrameLayout>
AA
source share