forked from Louvorg/ReaderForSelfoss-multiplatform
Daark theme working.
This commit is contained in:
@ -1,8 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:drawable="@color/ic_launcher_background"/>
|
||||
<item>
|
||||
<shape android:shape="rectangle" >
|
||||
<solid android:color="?attr/colorSurface" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<bitmap
|
||||
|
@ -18,8 +18,8 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:theme="@style/ToolBarStyle"
|
||||
app:popupTheme="?attr/toolbarPopupTheme" />
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
@ -107,8 +107,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/tags"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_height="40dp"
|
||||
android:theme="@style/App.Spinner"/>
|
||||
android:layout_height="40dp"/>
|
||||
|
||||
<Button
|
||||
android:text="@string/add_source_save"
|
||||
|
@ -32,8 +32,8 @@
|
||||
android:id="@+id/toolBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:theme="@style/ToolBarStyle"
|
||||
app:popupTheme="?attr/toolbarPopupTheme" />
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
@ -78,10 +78,12 @@
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
<com.ashokvarma.bottomnavigation.BottomNavigationBar
|
||||
android:layout_gravity="bottom"
|
||||
android:id="@+id/bottomBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"/>
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="bottom"
|
||||
app:bnbActiveColor="@color/colorAccent"
|
||||
app:bnbBackgroundColor="?attr/bottomBarBackground" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView
|
||||
|
@ -16,8 +16,8 @@
|
||||
android:id="@+id/toolBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:popupTheme="?attr/toolbarPopupTheme"
|
||||
android:theme="@style/ToolBarStyle" />
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:theme="@style/ToolBarStyle"
|
||||
app:popupTheme="?attr/toolbarPopupTheme" />
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
<LinearLayout
|
||||
|
@ -17,8 +17,8 @@
|
||||
android:id="@+id/toolBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:popupTheme="?attr/toolbarPopupTheme"
|
||||
android:theme="@style/ToolBarStyle" />
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:theme="@style/ToolBarStyle" />
|
||||
/>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
|
@ -14,8 +14,8 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:theme="@style/ToolBarStyle"
|
||||
app:popupTheme="?attr/toolbarPopupTheme" />
|
||||
|
||||
/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/clear"
|
||||
android:icon="@drawable/ic_history_white_24dp"
|
||||
android:title="@string/drawer_action_clear"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
13
androidApp/src/main/res/values-night/styles.xml
Normal file
13
androidApp/src/main/res/values-night/styles.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<resources>
|
||||
<style name="NoBar" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="colorAccentDark">@color/colorAccentDark</item>
|
||||
<item name="cardBackgroundColor">@color/white</item>
|
||||
<item name="materialDrawerHeaderStyle">@style/Widget.MaterialDrawerHeaderStyle</item>
|
||||
<item name="preferenceTheme">@style/PreferenceStyle</item>
|
||||
<item name="android:statusBarColor">#282828</item>
|
||||
<item name="bottomBarBackground">#282828</item>
|
||||
</style>
|
||||
</resources>
|
@ -2,5 +2,6 @@
|
||||
<resources>
|
||||
<declare-styleable name="Theme">
|
||||
<attr name="colorAccentDark" format="reference|color" />
|
||||
<attr name="bottomBarBackground" format="reference|color" />
|
||||
</declare-styleable>
|
||||
</resources>
|
@ -11,6 +11,4 @@
|
||||
<color name="refresh_progress_1">@color/colorAccentDark</color>
|
||||
<color name="refresh_progress_2">@color/colorAccent</color>
|
||||
<color name="refresh_progress_3">@color/pink</color>
|
||||
|
||||
<color name="darkBackground">#303030</color>
|
||||
</resources>
|
||||
|
@ -4,70 +4,20 @@
|
||||
<item name="android:windowBackground">@drawable/background_splash</item>
|
||||
</style>
|
||||
|
||||
<style name="NoBar" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
<style name="NoBar" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="colorAccentDark">@color/colorAccentDark</item>
|
||||
<item name="cardBackgroundColor">@color/white</item>
|
||||
<item name="android:colorBackground">@color/grey_50</item>
|
||||
<item name="colorSurface">@color/grey_50</item>
|
||||
<item name="android:textColorPrimary">@color/grey_900</item>
|
||||
<item name="android:textColorSecondary">@color/grey_400</item>
|
||||
<item name="materialDrawerStyle">@style/App.materialDrawerStyle</item>
|
||||
<item name="materialDrawerHeaderStyle">@style/Widget.MaterialDrawerHeaderStyle</item>
|
||||
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item>
|
||||
<item name="preferenceTheme">@style/PreferenceStyle</item>
|
||||
<item name="android:statusBarColor">?attr/colorPrimary</item>
|
||||
<item name="bottomBarBackground">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="NoBarDark" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="colorAccentDark">@color/colorAccentDark</item>
|
||||
<item name="cardBackgroundColor">@color/grey_800</item>
|
||||
<item name="android:colorBackground">@color/darkBackground</item>
|
||||
<item name="colorSurface">@color/darkBackground</item>
|
||||
<item name="alertDialogTheme">@style/AlertDialogDark</item>
|
||||
<item name="bnbBackgroundColor">@color/grey_900</item>
|
||||
<item name="android:textColorPrimary">@color/white</item>
|
||||
<item name="android:textColorSecondary">@color/grey_600</item>
|
||||
<item name="materialDrawerStyle">@style/App.materialDrawerStyle</item>
|
||||
<item name="materialDrawerHeaderStyle">@style/Widget.MaterialDrawerHeaderStyle</item>
|
||||
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
|
||||
<item name="preferenceTheme">@style/PreferenceStyle</item>
|
||||
</style>
|
||||
|
||||
<!-- ToolBar -->
|
||||
<style name="ToolBarStyle" parent="Theme.AppCompat">
|
||||
<item name="android:textColorPrimary">@color/white</item>
|
||||
<item name="android:textColorSecondary">@color/white</item>
|
||||
<item name="actionMenuTextColor">@color/white</item>
|
||||
<!--<item name="actionOverflowButtonStyle">@style/ActionButtonOverflowStyle</item>
|
||||
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>-->
|
||||
</style>
|
||||
|
||||
<!-- Material Drawer Theme -->
|
||||
<style name="App.materialDrawerStyle" parent="@style/Widget.MaterialDrawerStyle">
|
||||
<item name="materialDrawerPrimaryIcon">?android:textColorPrimary</item>
|
||||
<item name="materialDrawerSecondaryIcon">?android:textColorPrimary</item>
|
||||
<item name="materialDrawerSecondaryText">?android:textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<!-- Preference Theme -->
|
||||
<style name="PreferenceStyle" parent="@style/PreferenceThemeOverlay">
|
||||
<item name="android:tint">?android:textColorPrimary</item>
|
||||
<item name="android:tint">?attr/colorOnSurface</item>
|
||||
</style>
|
||||
|
||||
<!-- Spinner Theme -->
|
||||
<style name="App.Spinner" parent="Widget.AppCompat.Light.DropDownItem.Spinner">
|
||||
<item name="android:textColor">?android:textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<!-- Alert dialog Theme -->
|
||||
|
||||
<style name="AlertDialogDark" parent="Theme.MaterialComponents.Dialog">
|
||||
<item name="android:background">@color/darkBackground</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
@ -8,28 +8,4 @@
|
||||
android:key="dark_theme"
|
||||
app:iconSpaceReserved="false"
|
||||
android:title="Dark theme" />
|
||||
|
||||
<com.jaredrummler.android.colorpicker.ColorPreferenceCompat
|
||||
android:defaultValue="@color/colorPrimary"
|
||||
android:key="color_primary"
|
||||
app:iconSpaceReserved="false"
|
||||
android:title="Primary color"/>
|
||||
|
||||
<com.jaredrummler.android.colorpicker.ColorPreferenceCompat
|
||||
android:defaultValue="@color/colorPrimaryDark"
|
||||
android:key="color_primary_dark"
|
||||
app:iconSpaceReserved="false"
|
||||
android:title="Primary dark color"/>
|
||||
|
||||
<com.jaredrummler.android.colorpicker.ColorPreferenceCompat
|
||||
android:defaultValue="@color/colorAccent"
|
||||
android:key="color_accent"
|
||||
app:iconSpaceReserved="false"
|
||||
android:title="Accent color"/>
|
||||
|
||||
<com.jaredrummler.android.colorpicker.ColorPreferenceCompat
|
||||
android:defaultValue="@color/colorAccentDark"
|
||||
android:key="color_accent_dark"
|
||||
app:iconSpaceReserved="false"
|
||||
android:title="Accent dark color"/>
|
||||
</PreferenceScreen>
|
Reference in New Issue
Block a user