Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="fill_parent"
  4. android:layout_height="wrap_content"
  5. android:gravity="right" >
  6. <Switch
  7. android:id="@+id/switch1"
  8. android:layout_width="wrap_content"
  9. android:layout_height="match_parent"/>
  10. <ImageButton
  11. android:id="@+id/action_starred"
  12. android:layout_width="wrap_content"
  13. android:layout_height="wrap_content"
  14. style="?android:attr/actionButtonStyle"
  15. android:src="@android:drawable/ic_menu_compass"
  16. android:onClick="FakeMenu"/>
  17. </LinearLayout>
  18.  
  19. ActionBar actionBar = getActionBar();
  20. actionBar.setCustomView(R.layout.actionbar_top); //load your layout
  21. actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME|ActionBar.DISPLAY_SHOW_CUSTOM); //show it
  22.  
  23. android:showAsAction="ifRoom|withText"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement