Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. <style name="AppTheme.Parent" parent="Theme.AppCompat.Light.NoActionBar">
  2. <item name="colorPrimary">@color/blue</item>
  3. <item name="colorPrimaryDark">@color/dark_blue</item>
  4. <item name="colorAccent">@color/pink</item>
  5.  
  6. <item name="android:windowNoTitle">true</item>
  7. <item name="windowActionBar">false</item>
  8. </style>
  9.  
  10. <android.support.v7.widget.Toolbar
  11. xmlns:android="http://schemas.android.com/apk/res/android"
  12. xmlns:app="http://schemas.android.com/tools"
  13. android:layout_width="match_parent"
  14. android:layout_height="wrap_content"
  15. android:background="?attr/colorPrimary"
  16. android:minHeight="@dimen/abc_action_bar_default_height_material"
  17. app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
  18. app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
  19.  
  20. <style name="MyToolbarStyle" parent="ThemeOverlay.AppCompat.ActionBar">
  21. <!-- Used to for the title of the Toolbar -->
  22. <item name="android:textColorPrimary">#fff</item>
  23. <!-- Used to for the title of the Toolbar when parent is Theme.AppCompat.Light -->
  24. <item name="android:textColorPrimaryInverse">#fff</item>
  25. <!-- Used to color the text of the action menu icons -->
  26. <item name="android:textColorSecondary">#fff</item>
  27. <!-- Used to color the overflow menu icon -->
  28. <item name="actionMenuTextColor">#fff</item>
  29. <!-- Color of the Toolbar -->
  30. <item name="android:background">#455a64</item>
  31. </style>
  32.  
  33. <android.support.v7.widget.Toolbar
  34. xmlns:android="http://schemas.android.com/apk/res/android"
  35. android:layout_width="match_parent"
  36. android:layout_height="wrap_content"
  37. android:background="?attr/colorPrimary"
  38. android:minHeight="@dimen/abc_action_bar_default_height_material">
  39.  
  40. <!-- Below will add your text in the center of toolbar -->
  41. <TextView
  42. android:layout_width="wrap_content"
  43. android:layout_height="wrap_content"
  44. android:layout_gravity="center"
  45. android:text="Your Text"
  46. android:textColor=#ff0000
  47. android:textStyle="bold"/>
  48.  
  49. </android.support.v7.widget.Toolbar>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement