base_toolbar.xml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:layout_width="match_parent"
  5. android:layout_height="wrap_content"
  6. android:gravity="center_horizontal|center">
  7. <android.support.v7.widget.Toolbar
  8. style="@style/fullToolbarStyle"
  9. android:id="@+id/sub_toolbar"
  10. android:layout_width="match_parent"
  11. android:layout_height="56dp"
  12. android:background="@color/colorPrimary"
  13. app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
  14. app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
  15. <FrameLayout
  16. android:id="@+id/toolbar_layout"
  17. android:layout_width="match_parent"
  18. android:layout_height="?attr/actionBarSize"
  19. android:background="@color/colorPrimary"
  20. android:gravity="center">
  21. <LinearLayout
  22. android:id="@+id/toolbar_left_items"
  23. android:layout_width="match_parent"
  24. android:layout_height="match_parent"
  25. android:gravity="left|center_vertical"
  26. android:orientation="horizontal">
  27. </LinearLayout>
  28. <LinearLayout
  29. android:id="@+id/toolbar_right_items"
  30. android:layout_width="match_parent"
  31. android:layout_height="match_parent"
  32. android:layout_marginRight="10dp"
  33. android:gravity="right|center_vertical"
  34. android:orientation="horizontal">
  35. </LinearLayout>
  36. </FrameLayout>
  37. </android.support.v7.widget.Toolbar>
  38. <TextView
  39. android:id="@+id/toolbar_title_text"
  40. android:layout_width="match_parent"
  41. android:layout_height="wrap_content"
  42. android:layout_marginTop="15dp"
  43. android:background="@null"
  44. android:ems="10"
  45. android:enabled="false"
  46. android:inputType="none"
  47. android:textAlignment="center"
  48. android:textColor="@android:color/white"
  49. android:textSize="18sp" />
  50. </RelativeLayout>