Add dark theme for material drawer

This commit is contained in:
Shinokuni 2019-12-15 13:01:16 +01:00
parent 9ede16c864
commit 5af8e1af62
4 changed files with 23 additions and 13 deletions

View File

@ -18,7 +18,8 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
android:theme="@style/ToolbarTheme"
app:popupTheme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar" />
<RelativeLayout
android:id="@+id/sync_progress_layout"
@ -88,10 +89,10 @@
android:id="@+id/empty_list_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:image="@drawable/ic_rss_feed_grey"
app:text="@string/no_item"
android:layout_gravity="center"
android:visibility="gone" />
android:visibility="gone"
app:image="@drawable/ic_rss_feed_grey"
app:text="@string/no_item" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/add_feed_fab"

View File

@ -16,6 +16,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/manage_feeds_folders_toolbar"
style="@style/ToolbarTheme"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_scrollFlags="scroll|enterAlways" />

View File

@ -1,10 +1,12 @@
<resources>
<style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
<style name="AppTheme" parent="MaterialDrawerTheme.ActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="actionModeBackground">@color/colorPrimary</item>
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
</style>
</resources>

View File

@ -1,6 +1,6 @@
<resources>
<style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
<style name="AppTheme" parent="MaterialDrawerTheme.Light.ActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
@ -8,7 +8,10 @@
<item name="colorControlNormal">@color/colorControlNormal</item>
<item name="android:textColorPrimary">@color/textColorPrimary</item>
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
<item name="actionModeBackground">@color/colorPrimary</item>
<item name="actionBarTheme">@style/ToolbarTheme</item>
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
</style>
<style name="AppTheme.NoActionBar" parent="AppTheme">
@ -21,15 +24,18 @@
<item name="android:windowBackground">@drawable/splash_background</item>
</style>
<style name="TextAppearance.Design.CollapsingToolbar.Expanded.Custom" parent="TextAppearance.Design.CollapsingToolbar.Expanded">
<item name="android:textSize">12sp</item>
<item name="android:color">@color/colorBackground</item>
<item name="android:layout_margin">14dp</item>
<style name="ToolbarTheme" parent="ThemeOverlay.AppCompat.ActionBar">
<item name="android:textColorPrimary">@android:color/white</item>
<item name="colorControlNormal">@android:color/white</item>
</style>
<style name="GenericButton" parent="Base.Widget.AppCompat.Button.Colored">
<style name="GenericButton" parent="Widget.AppCompat.Button.Colored">
<item name="android:colorBackground">@color/colorPrimary</item>
<item name="android:textColorPrimary">@color/colorControlNormal</item>
</style>
<style name="DrawerArrowStyle" parent="MaterialDrawer.DrawerArrowStyle">
<item name="color">@android:color/white</item>
</style>
</resources>