Guest User

Untitled

a guest
Jun 5th, 2017
74
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-- I want to set the toolbarStyle for all toolbars here, including the overlay android:theme -->
  2. <style name="AppThemeAppCompat" parent="Theme.AppCompat.Light.DarkActionBar">
  3.         <!-- Customize your theme here. -->
  4.         <item name="colorPrimary">@color/colorPrimary</item>
  5.         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
  6.         <item name="colorAccent">@color/colorAccent</item>
  7.         <item name="windowActionBar">false</item>
  8.         <item name="windowNoTitle">true</item>
  9.  
  10.         <item name="toolbarStyle">@style/ToolbarStyle</item>
  11.         <item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
  12. </style>
  13.  
  14. <!-- I want all toolbars by default to be styled like this -->
  15. <style name="ToolbarStyle" parent="Widget.AppCompat.Toolbar">
  16.         <item name="android:background">?colorPrimary</item>
  17.         <item name="android:minHeight">?actionBarSize</item>
  18.         <item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
  19.         <item name="android:theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
  20. </style>
  21.  
  22. <!-- In a layout I want to just use a toolbar like: -->
  23. <android.support.v7.widget.Toolbar
  24.        android:id="@+id/sign_in_toolbar"
  25.        android:layout_width="match_parent"
  26.        android:layout_height="wrap_content"/>
  27. <!-- This toolbar doesn't pick up the android:theme attribute from styles -->
RAW Paste Data