I have a problem with a Toolbar (with TabLayout) during the scroll, as it also hides the notification bar, making it look the title of the toolbar.
Here the layout of the activity:
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.example.testapp.MainActivity">
<android.support.design.widget.AppBarLayout
android:id="#+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="#style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="#style/AppTheme.PopupOverlay">
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout
android:id="#+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="#+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="#string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
How can i solve this? I've seen apps like Google Play or Phonograph not have this problem.
Thanks in advance.
Regards.
UPDATE
Here is my style.xml
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
And style.xml v21
<resources>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">#android:color/transparent</item>
</style>
</resources>
About the response of MML13 to remove fitsSystemWindows, it works, but the notification bar loses color, being white.
Try this.
Change this part.
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">#android:color/transparent</item>
</style>
To this.
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">#color/colorPrimaryDark</item>
</style>
Hope this will help you.
Change
app:layout_scrollFlags="scroll|exituntilcollapse"
instead of
app:layout_scrollFlags="scroll|enterAlways"
remove:
android:fitsSystemWindows="true"
from CoordinatorLayout
you must use:
valuse style:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#673AB7</item>
<item name="colorPrimaryDark">#512DA8</item>
<item name="colorAccent">#FF4081</item>
</style>
values-v21:
<style name="Theme.DesignDemo" parent="AppTheme">
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">#android:color/transparent</item>
</style>
Related
The code blocks in my activity_main.xml with the errors are as follows:
<EditText
style="#style/editText_style"
android:inputType="textEmailAddress"
android:id="#+id/editText1" />
<EditText
style="#style/editText_style"
android:inputType="textPassword"
android:id="#+id/editText2" />
The code in my styles are as follows:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
<style name="editText_style">
<item name="android:gravity">center</item>
<item name="android:background">#drawable/editText_background</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
<item name="android:ems">10</item>
<item name="android:layout_margin">10dp</item>
</style>
</resources>
I'm getting the error stating:
The 'style' attribute is not declared.
I dont understand what is wrong. Any help appreciated. Thank you.
I am trying to change my background colour for my app and the actionBar to different colours:
<!-- Base application theme. -->
<style name="actionBar" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/veniceblue</item>
</style>
<style name="AppTheme" parent="Theme.AppCompat">
<item name="android:background">#drawable/background_template</item>
<item name="actionBarTheme">#color/veniceblue</item>
</style>
But in my manifest file i add :
android:theme="#style/actionBar">
But I'm not sure how to add the background at the same time?
I do want it to be set for the whole application??
Excuse me if i didn't understand your question (i'm just a beginner trying to learn and help )
you can use android.support.v7.widget.Toolbar
layout.xml
<android.support.design.widget.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:theme="#style/AppTheme.AppBarOverlay"
android:id="#+id/appBarLayout">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="#style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
and style.xml
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="AppCompaTheme" parent="Theme.AppCompat.Light">
<item name="colorPrimary">#color/primaryColor</item>
<item name="colorPrimaryDark">#color/primaryColorDark</item>
<item name="android:textColorPrimary">#android:color/white</item>
<item name="android:windowNoTitle">true</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
</style>
I have a theme that works but refuses to set android:windowBackgorund and android:colorBackground.
The rest of the code works properly, and if I switch the items in the default theme it works properly.
styles.xml:
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="android:navigationBarColor">#color/colorPrimary</item>
<item name="android:radioButtonStyle">#style/radioLight</item>
</style>
<style name="Dark" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="android:navigationBarColor">#color/colorPrimary</item>
<item name="android:windowBackground">#color/grey</item>
<item name="android:colorBackground">#color/grey</item>
<item name="android:textColor">#color/white</item>
<item name="android:textColorHint">#color/soft_grey</item>
<item name="android:radioButtonStyle">#style/radioDark</item>
</style>
Main:
setTheme(R.style.Dark);
Don't know if it's useless
activity_main xml:
<android.support.design.widget.AppBarLayout
android:id="#+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="#dimen/appbar_padding_top"
android:theme="#style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:scrollbars="none"
app:popupTheme="#style/AppTheme.PopupOverlay">
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout
android:id="#+id/tabs"
android:layout_width="match_parent"
android:layout_height="35dp" />
</android.support.design.widget.AppBarLayout>
What's the shameful mistake i committed?
Add 2 new resource files:
For light theme splash_background.xml:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="#color/white" />
<item>
<bitmap android:gravity="center"
android:src="#drawable/logo"/>
</item>
</layer-list>
for dark theme splash_background.xml place it in drawable-night folder (create if you dont have it ):
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="#color/grey" />
<item>
<bitmap android:gravity="center"
android:src="#drawable/logo"/>
</item>
</layer-list>
Finally In your themes.xml:
<style name="Theme.AppName.SplashTheme" parent="Theme.AppName">
<item name="android:windowBackground">#drawable/splash_background</item>
</style>
android:windowBackground only accepts a drawable. Try changing it to something like
<item name="android:windowBackground">#drawable/abc</item>
And create a file abc.xml such as
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#color/grey"/>
</shape>
And just checking, do you call setTheme before calling super.onCreate()?
I just added drawerlayout in my app an changed the background color of toolbar,but drawerlayout button and menu icon are black , it should be white.
style.xml:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="actionMenuTextColor">#color/font</item>
<item name="android:actionMenuTextColor">#color/font</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
AppBarLayout:
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll" >
<com.miguelcatalan.materialsearchview.MaterialSearchView
android:id="#+id/search_view"
android:layout_width="30.0dip"
android:layout_height="match_parent"
/>
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout
android:id="#+id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
app:tabIndicatorColor="#color/tab_normal"
app:tabSelectedTextColor="#color/tab_se"
app:tabTextColor="#color/tab_normal"
/>
</android.support.design.widget.AppBarLayout>
And that is what app looks like:
Add a new style to change the color of hamburger icon and overflow menu icon.
To change Hamburger Icon color
<style name="DrawerArrowStyle" parent="#style/Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">#android:color/white</item>
To change Overflow Menu Color
Add this item to your current style.
<item name="android:textColorSecondary">#android:color/white</item>
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="color">#android:color/black</item>
</style>
<style name="MyMaterialTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="android:windowContentTransitions" tools:targetApi="lollipop">true</item>
<item name="android:windowAllowEnterTransitionOverlap" tools:targetApi="lollipop">true
</item>
<item name="android:windowAllowReturnTransitionOverlap" tools:targetApi="lollipop">true
</item>
<item name="android:windowSharedElementEnterTransition" tools:targetApi="lollipop">
#android:transition/move
</item>
<item name="android:windowSharedElementExitTransition" tools:targetApi="lollipop">
#android:transition/move
</item>
<item name="drawerArrowStyle">#style/DrawerArrowStyle</item>
<item name="android:statusBarColor">#color/white</item>
<item name="android:windowLightStatusBar">true</item>
</style>
I upgraded from 21.0.3 to 23.1.1 support library in my android project and i am getting this error
Caused by: java.lang.IllegalArgumentException: AppCompat does not support the current theme features: { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: true, windowNoTitle: false }
at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:422)
at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:279)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:253)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
at com.robotemplates.cityguide.activity.MainActivity.onCreate(MainActivity.java:75)
at android.app.Activity.performCreate(Activity.java:6092)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2468)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2601)
at android.app.ActivityThread.access$800(ActivityThread.java:178)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5637)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
The error is pointing to setContentView(R.layout.activity_main);
Can someone help me out?
My styles.xml
<?xml version="1.0" encoding="utf-8"?>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="android:textColor">#FFFFFF</item>
<item name="android:textColorPrimary">#212121</item>
<item name="android:textColorSecondary">#727272</item>
<item name="android:divider">#B6B6B6</item>
</style>
<!--<style name="AppTheme.NoActionBar">-->
<!--<item name="windowActionBar">false</item>-->
<!--<item name="windowNoTitle">true</item>-->
<!--</style>-->
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="Widget.CityGuide.Toolbar" parent="#style/Widget.AppCompat.Toolbar">
<item name="android:background">?attr/colorPrimary</item>
<item name="theme">#style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
<item name="popupTheme">#style/ThemeOverlay.AppCompat.Light</item>
</style>
<style name="TextAppearance.CityGuide.Display4" parent="#style/TextAppearance.AppCompat.Display4">
<item name="android:textSize">#dimen/global_text_size_display_4</item>
<item name="android:textColor">?android:textColorSecondary</item>
</style>
<style name="TextAppearance.CityGuide.Display3" parent="#style/TextAppearance.AppCompat.Display3">
<item name="android:textSize">#dimen/global_text_size_display_3</item>
<item name="android:textColor">?android:textColorSecondary</item>
</style>
<style name="TextAppearance.CityGuide.Display2" parent="#style/TextAppearance.AppCompat.Display2">
<item name="android:textSize">#dimen/global_text_size_display_2</item>
<item name="android:textColor">?android:textColorSecondary</item>
</style>
<style name="TextAppearance.CityGuide.Display1" parent="#style/TextAppearance.AppCompat.Display1">
<item name="android:textSize">#dimen/global_text_size_display_1</item>
<item name="android:textColor">?android:textColorSecondary</item>
</style>
<style name="TextAppearance.CityGuide.Headline" parent="#style/TextAppearance.AppCompat.Headline">
<item name="android:textSize">#dimen/global_text_size_headline</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="TextAppearance.CityGuide.Title" parent="#style/TextAppearance.AppCompat.Title">
<item name="android:textSize">#dimen/global_text_size_title</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="TextAppearance.CityGuide.Subhead" parent="#style/TextAppearance.AppCompat.Subhead">
<item name="android:textSize">#dimen/global_text_size_subhead</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="TextAppearance.CityGuide.Body2" parent="#style/TextAppearance.AppCompat.Body2">
<item name="android:textSize">#dimen/global_text_size_body_2</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="TextAppearance.CityGuide.Body1" parent="#style/TextAppearance.AppCompat.Body1">
<item name="android:textSize">#dimen/global_text_size_body_1</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="TextAppearance.CityGuide.Caption" parent="#style/TextAppearance.AppCompat.Caption">
<item name="android:textSize">#dimen/global_text_size_caption</item>
<item name="android:textColor">?android:textColorSecondary</item>
</style>
<style name="TextAppearance.CityGuide.Button" parent="#style/TextAppearance.AppCompat.Button">
<item name="android:textSize">#dimen/global_text_size_button</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="textAllCaps">true</item>
</style>
<style name="TextAppearance.CityGuide.Menu" parent="#style/TextAppearance.AppCompat.Menu">
<item name="android:textSize">#dimen/global_text_size_menu</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="TextAppearance.CityGuide.Placeholder" parent="#style/TextAppearance.AppCompat.Body1">
<item name="android:textSize">#dimen/global_text_size_placeholder</item>
<item name="android:textColor">?android:textColorSecondary</item>
</style>
<style name="TextAppearance.CityGuide.Display4.Inverse" parent="#style/TextAppearance.CityGuide.Display4">
<item name="android:textColor">?android:attr/textColorSecondaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.CityGuide.Display3.Inverse" parent="#style/TextAppearance.CityGuide.Display3">
<item name="android:textColor">?android:attr/textColorSecondaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.CityGuide.Display2.Inverse" parent="#style/TextAppearance.CityGuide.Display2">
<item name="android:textColor">?android:attr/textColorSecondaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.CityGuide.Display1.Inverse" parent="#style/TextAppearance.CityGuide.Display1">
<item name="android:textColor">?android:attr/textColorSecondaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.CityGuide.Headline.Inverse" parent="#style/TextAppearance.CityGuide.Headline">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.CityGuide.Title.Inverse" parent="#style/TextAppearance.CityGuide.Title">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.CityGuide.Subhead.Inverse" parent="#style/TextAppearance.CityGuide.Subhead">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.CityGuide.Body2.Inverse" parent="#style/TextAppearance.CityGuide.Body2">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.CityGuide.Body1.Inverse" parent="#style/TextAppearance.CityGuide.Body1">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.CityGuide.Caption.Inverse" parent="#style/TextAppearance.CityGuide.Caption">
<item name="android:textColor">?android:attr/textColorSecondaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.CityGuide.Button.Inverse" parent="#style/TextAppearance.CityGuide.Button">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
<style name="TextAppearance.CityGuide.Menu.Inverse" parent="#style/TextAppearance.CityGuide.Menu">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textColorHint">?android:attr/textColorHintInverse</item>
<item name="android:textColorHighlight">?android:attr/textColorHighlightInverse</item>
<item name="android:textColorLink">?android:attr/textColorLinkInverse</item>
</style>
my activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="#+id/activity_main_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<include layout="#layout/toolbar" />
<include layout="#layout/fab_search" />
</FrameLayout>
<com.robotemplates.cityguide.view.ScrimInsetsFrameLayout
android:id="#+id/activity_main_drawer"
android:layout_width="#dimen/drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#color/global_bg_front"
android:fitsSystemWindows="true"
app:insetForeground="#color/drawer_inset_foreground">
<android.support.v7.widget.RecyclerView
android:id="#+id/activity_main_drawer_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
</com.robotemplates.cityguide.view.ScrimInsetsFrameLayout>
keep windowActionBar to false and add windowNoTitle as well and set it to true.
ie
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>