-1

I am building my first (material designed) app in Android Studio. I am following Slidnerd's Material design playlist, I'm up to #5. I wanted to know how I can have the menu popup to have dark text while have white primary and secondary text. Thanks!

Gursimran Bedi
  • 119
  • 1
  • 1
  • 8

1 Answers1

0

If i undestood your question, you need this:

Set color of Toolbar in xml:

<android.support.v7.widget.Toolbar
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/my_awesome_toolbar"
     android:layout_height="56dp"
     android:layout_width="match_parent"
     android:minHeight="?attr/actionBarSize"
     android:background="@color/purple_800" <!--color-->
     app:theme="@style/ActionBarThemeOverlay"
     app:popupTheme="@style/ActionBarPopupThemeOverlay"
     android:elevation="2dp"/>

And another in style:

<style name="NoActionBarTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:actionMenuTextColor">#fff</item>
        <item name="android:windowAnimationStyle">@null</item>
    </style>

    <style name="ActionBarThemeOverlay" parent="">
        <item name="android:textColorPrimary">#fff</item>
        <item name="colorControlNormal">@color/gray_800</item>
        <item name="colorControlHighlight">@color/gray_800</item>
        <item name="android:textColor">#fff</item>
    </style>

    <style name="ActionBarPopupThemeOverlay" parent="ThemeOverlay.AppCompat.Light" >
        <item name="android:background">@android:color/white</item>
        <item name="android:textColor">#fff</item>
    </style>

and in values-v21 include this too

<item name="android:colorPrimary">@color/purple_900</item>
        <item name="android:colorPrimaryDark">@color/purple_900</item>
MilanNz
  • 1,323
  • 3
  • 12
  • 29