I have created like instagram action bar like a tabs you may check my previous answer and how i did it. Im using phone right im not able to post the code as its on my laptop. Anyway just check my previous answer . Later i will drop by again and post the code.
Edit------
Edit here is the image :).
back again with a best results :). first thing you need to do is
create a layout name it header.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="@dimen/action_bar_height"
android:layout_gravity="top"
android:baselineAligned="true"
android:orientation="horizontal" >
<ImageView
android:id="@+id/share"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight=".14"
android:background="@drawable/action_bar_left_button"
android:src="@drawable/action_bar_glyph_back" />
<ImageView
android:id="@+id/bright"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".14"
android:background="@drawable/action_bar_left_button"
android:src="@drawable/action_bar_glyph_lux" />
<ImageView
android:id="@+id/rotate"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".14"
android:background="@drawable/action_bar_left_button"
android:src="@drawable/rotate" />
<ImageView
android:id="@+id/bright"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".14"
android:background="@drawable/action_bar_left_button"
android:src="@drawable/action_bar_glyph_lux" />
<ImageView
android:id="@+id/rotate"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".14"
android:background="@drawable/action_bar_left_button"
android:src="@drawable/rotate" />
<ImageView
android:id="@+id/forwa"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".14"
android:background="@drawable/action_bar_left_button"
android:src="@drawable/forward" />
</LinearLayout>
after that go to your MainActivity.class and create this method.
private void setupActionBar() {
ActionBar actionBar = getActionBar();
//actionBar.setDisplayShowHomeEnabled(false);
actionBar.setDisplayShowTitleEnabled(false);
ViewGroup v = (ViewGroup)LayoutInflater.from(this)
.inflate(R.layout.header, null);
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM,
ActionBar.DISPLAY_SHOW_CUSTOM);
actionBar.setCustomView(v,
new ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT,
ActionBar.LayoutParams.WRAP_CONTENT,
Gravity.CENTER_VERTICAL | Gravity.RIGHT));
}
add setupActionBar();
to your onCreate Activity and run your app :).
now you have custom ActionBar with Dividers and Images P.S the divider is defined in the layout as an image background :).