Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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="wrap_content"
- android:gravity="right" >
- <Switch
- android:id="@+id/switch1"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"/>
- <ImageButton
- android:id="@+id/action_starred"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="?android:attr/actionButtonStyle"
- android:src="@android:drawable/ic_menu_compass"
- android:onClick="FakeMenu"/>
- </LinearLayout>
- ActionBar actionBar = getActionBar();
- actionBar.setCustomView(R.layout.actionbar_top); //load your layout
- actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME|ActionBar.DISPLAY_SHOW_CUSTOM); //show it
- android:showAsAction="ifRoom|withText"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement