From 393f7c1abac21c652197cc99d155c594b9142f25 Mon Sep 17 00:00:00 2001 From: Zhang Hai Date: Fri, 30 Mar 2018 23:04:44 -0700 Subject: [PATCH] [Fix] Work around AppCompat divider bug for good; Fixes dividers in DialogWhenLarge on tablet. --- .../main/res/drawable/list_divider_dark.xml | 13 ++++++++++++ .../main/res/drawable/list_divider_light.xml | 13 ++++++++++++ app/src/main/res/values/themes.xml | 20 +++++++++++-------- 3 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 app/src/main/res/drawable/list_divider_dark.xml create mode 100644 app/src/main/res/drawable/list_divider_light.xml diff --git a/app/src/main/res/drawable/list_divider_dark.xml b/app/src/main/res/drawable/list_divider_dark.xml new file mode 100644 index 00000000..fd633fd1 --- /dev/null +++ b/app/src/main/res/drawable/list_divider_dark.xml @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/list_divider_light.xml b/app/src/main/res/drawable/list_divider_light.xml new file mode 100644 index 00000000..ae87ab89 --- /dev/null +++ b/app/src/main/res/drawable/list_divider_light.xml @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index d9330345..b253b2e2 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -78,6 +78,7 @@ @style/ThemeOverlay.Douya.Dark.ActionBar @style/ThemeOverlay.Douya.Light + @drawable/list_divider_light @color/douya_primary @color/douya_primary_dark @@ -91,6 +92,7 @@ @style/ThemeOverlay.Douya.Dark.ActionBar + @drawable/list_divider_dark @color/douya_accent @@ -107,10 +109,9 @@ @style/TextAppearance.Douya.Widget.ActionBar.Menu - ?colorAccent - ?android:dividerHorizontal ?android:dividerVertical + ?colorAccent @style/Widget.Douya.Toolbar @style/Widget.Douya.Toolbar.Button.Navigation @@ -124,10 +125,9 @@ @style/TextAppearance.Douya.Widget.ActionBar.Menu - ?colorAccent - ?android:dividerHorizontal ?android:dividerVertical + ?colorAccent @style/Widget.Douya.Toolbar @style/Widget.Douya.Toolbar.Button.Navigation @@ -164,6 +164,8 @@ @style/ThemeOverlay.Douya.Dark.ActionBar @style/ThemeOverlay.Douya.Light + @drawable/list_divider_light + @drawable/list_divider_light @color/douya_primary @color/douya_primary_dark @@ -177,6 +179,8 @@ @style/ThemeOverlay.Douya.ActionBar + @drawable/list_divider_light + @drawable/list_divider_light @color/douya_accent @@ -188,6 +192,8 @@ @style/ThemeOverlay.Douya.Dark.ActionBar + @drawable/list_divider_dark + @drawable/list_divider_dark @color/douya_accent @@ -204,10 +210,9 @@ @style/TextAppearance.Douya.Widget.ActionBar.Menu - ?colorAccent - ?android:dividerHorizontal ?android:dividerVertical + ?colorAccent @style/Widget.Douya.Toolbar @style/Widget.Douya.Toolbar.Button.Navigation @@ -221,10 +226,9 @@ @style/TextAppearance.Douya.Widget.ActionBar.Menu - ?colorAccent - ?android:dividerHorizontal ?android:dividerVertical + ?colorAccent @style/Widget.Douya.Toolbar @style/Widget.Douya.Toolbar.Button.Navigation