Advertisement
Guest User

Untitled

a guest
Nov 14th, 2014
515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.nav_bar));
  2. getSupportActionBar().setIcon(new ColorDrawable(getResources().getColor(android.R.color.transparent)));
  3. getSupportActionBar().setDisplayShowTitleEnabled(false);
  4. getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
  5. getSupportActionBar().setDisplayShowHomeEnabled(false);
  6. getSupportActionBar().setDisplayHomeAsUpEnabled(false);
  7. getSupportActionBar().setHomeButtonEnabled(false);
  8.  
  9. <?xml version="1.0" encoding="utf-8"?>
  10. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  11. android:layout_width="match_parent"
  12. android:layout_height="match_parent">
  13.  
  14. <ImageView
  15. android:layout_width="match_parent"
  16. android:layout_height="match_parent"
  17. android:scaleType="fitXY"
  18. android:src="@drawable/nav_bar"/>
  19.  
  20. <TextView
  21. android:id="@+id/title"
  22. android:layout_width="wrap_content"
  23. android:layout_height="wrap_content"
  24. android:text="Title"
  25. android:layout_centerInParent="true"
  26. android:textColor="@color/irapptheme_color"
  27. android:textSize="20sp"/>
  28.  
  29. <ImageButton
  30. android:id="@+id/btn_back"
  31. android:layout_width="48dp"
  32. android:layout_height="match_parent"
  33. android:background="@android:color/darker_gray"
  34. android:padding="12dp"
  35. android:layout_centerVertical="true"
  36. android:scaleType="fitCenter"
  37. android:src="@drawable/btn_back"
  38. android:visibility="gone"/>
  39.  
  40. <ImageButton
  41. android:id="@+id/btn_search"
  42. android:layout_width="48dp"
  43. android:layout_height="match_parent"
  44. android:layout_alignParentRight="true"
  45. android:layout_centerVertical="true"
  46. android:padding="12dp"
  47. android:background="@android:color/transparent"
  48. android:src="@drawable/btn_search"
  49. android:visibility="gone"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement