android - Invert the split action bar -


i modified action bar on application use split actionbar functionality described here: http://developer.android.com/guide/topics/ui/actionbar.html#splitbar

i created draft custom view in order see result on device, here xml:

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="right" > <imagebutton     android:id="@+id/action1"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     style="?android:attr/actionbuttonstyle"     android:src="@android:drawable/ic_menu_compass" /> <imagebutton     android:id="@+id/action2"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     style="?android:attr/actionbuttonstyle"     android:src="@android:drawable/ic_menu_compass" /> </linearlayout> 

in activity, modified code add 2 required lines set custom xml , way should displayed:

actionbar actionbar = getactionbar();     actionbar.setcustomview(r.layout.action_bar_bottom); //load bottom menu     actionbar.setdisplayoptions(actionbar.display_show_home|actionbar.display_show_custom);     actionbar.setdisplayshowtitleenabled(false);     actionbar.show(); 

the split working well, problem action bar using @ bottom of screen , new 1 defined in xml above displayed @ top of screen, along home button.

i looked @ function setdisplayoptions in developer guide not clear me how use it. there easy way invert 2 action bars in order let main action bar @ top?

thank you!


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -