android - How to place my Actionbar item to the left side, before title? -
android - How to place my Actionbar item to the left side, before title? -
how move actionbar item left side of actionbar, before title? have 2 items, edit , settings, need items placed both on right , left side, places default on right, how can alter it?
in activity
actionbar actionbar = getactionbar();
actionbar.setdisplayshowhomeenabled(false); view mactionbarview = getlayoutinflater().inflate(r.layout.my_action_bar, null); actionbar.setcustomview(mactionbarview); actionbar.setdisplayoptions(actionbar.display_show_custom);
my_action_bar.xml:
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/turquoise"> <imagebutton android:id="@+id/btn_slide" android:layout_height="wrap_content" android:layout_width="wrap_content" android:background="@null" android:scaletype="centerinside" android:src="@drawable/btn_slide" android:paddingright="50dp" android:onclick="togglemenu" android:paddingtop="4dp"/> </relativelayout>
android android-actionbar icons positioning android-actionbar-compat
Comments
Post a Comment