Fix common toolbar popup menu text color (fixes #2695)

This commit is contained in:
arkon 2020-03-12 19:14:43 -04:00
parent 231771e16c
commit b9ea6e8d96
6 changed files with 18 additions and 9 deletions

View File

@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/common_action_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
@ -12,6 +12,7 @@
android:background="?attr/colorPrimary"
android:theme="?attr/actionBarTheme"
android:visibility="gone"
android:elevation="2dp"
app:contentInsetStart="8dp"
app:contentInsetEnd="8dp">
@ -20,6 +21,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.MaterialToolbar>
</FrameLayout>

View File

@ -16,7 +16,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"

View File

@ -48,7 +48,7 @@
android:visibility="invisible"
tools:visibility="visible">
<androidx.appcompat.widget.Toolbar
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"

View File

@ -10,7 +10,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"

View File

@ -118,6 +118,14 @@
<item name="android:textColor">?android:attr/textColorHint</item>
</style>
<style name="TextAppearance.Widget.Button" parent="TextAppearance.MaterialComponents.Button">
<item name="android:letterSpacing">0</item>
</style>
<style name="TextAppearance.Widget.Menu" parent="TextAppearance.AppCompat.Menu">
<item name="android:textColor">?attr/colorOnBackground</item>
</style>
<!--=======-->
<!--Widgets-->
<!--=======-->
@ -189,10 +197,6 @@
<!--==============-->
<!--Widgets.Button-->
<!--==============-->
<style name="TextAppearance.Widget.Button" parent="TextAppearance.MaterialComponents.Button">
<item name="android:letterSpacing">0</item>
</style>
<style name="Theme.Widget.Button" parent="Widget.MaterialComponents.Button.TextButton">
<item name="android:textColor">?attr/colorOnSurface</item>
</style>

View File

@ -22,6 +22,7 @@
<item name="colorOnSecondary">@color/textColorPrimaryDark</item>
<item name="colorSurface">@color/dialogLight</item>
<item name="colorOnSurface">@color/textColorPrimaryLight</item>
<item name="colorOnBackground">@color/textColorPrimaryLight</item>
<item name="colorAccent">@color/colorAccentLight</item>
<!-- Base background/text colors -->
@ -50,6 +51,7 @@
<item name="dialogTheme">@style/Theme.AlertDialog.Light</item>
<item name="alertDialogTheme">@style/Theme.AlertDialog.Dark</item>
<item name="textAppearanceButton">@style/TextAppearance.Widget.Button</item>
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
<!-- Custom Attributes-->
<item name="selectable_library_drawable">@drawable/library_item_selector_light</item>
@ -76,6 +78,7 @@
<item name="colorOnSecondary">@color/textColorPrimaryDark</item>
<item name="colorSurface">@color/dialogDark</item>
<item name="colorOnSurface">@color/textColorPrimaryDark</item>
<item name="colorOnBackground">@color/textColorPrimaryDark</item>
<item name="colorAccent">@color/colorAccentDark</item>
<!-- Handles RTL text -->
@ -108,6 +111,7 @@
<item name="dialogTheme">@style/Theme.AlertDialog.Dark</item>
<item name="alertDialogTheme">@style/Theme.AlertDialog.Dark</item>
<item name="textAppearanceButton">@style/TextAppearance.Widget.Button</item>
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
<item name="md_background_color">?attr/colorSurface</item>