Compare commits

...

7 commits

Author SHA1 Message Date
c46c701ff3 styles: Fix styling for context menus and dialogs
...and use the AppCompat-provided DayNight selector theme
2022-08-27 17:07:15 -04:00
f32e15106a styles: Inherit the dark theme in dark mode 2022-08-27 16:39:15 -04:00
09e6e3db54 colors: Fix text and menu colors in night mode 2022-08-27 16:24:53 -04:00
b1de2c93b8 colors: Add colors for system-wide dark mode 2022-08-27 16:21:12 -04:00
f77281dc5b colors: Adjust colors for selected apps 2022-08-27 16:08:40 -04:00
6db4f84d35 AppListFragment: ConstraintLayout cannot be the parent of SwipeRefreshLayout
It causes problems with click events. Just use plain old FrameLayout for
this fragment.
2022-08-27 16:04:31 -04:00
4ea875be1a colors: Stop referring to black / grey / white directly
Prepare for Material You impl
2022-08-27 16:02:49 -04:00
8 changed files with 54 additions and 18 deletions

2
.idea/misc.xml generated
View file

@ -7,6 +7,8 @@
<entry key="app/src/main/res/drawable/circle_accent.xml" value="0.288" /> <entry key="app/src/main/res/drawable/circle_accent.xml" value="0.288" />
<entry key="app/src/main/res/layout/activity_main.xml" value="0.2838541666666667" /> <entry key="app/src/main/res/layout/activity_main.xml" value="0.2838541666666667" />
<entry key="app/src/main/res/layout/activity_settings.xml" value="0.19375" /> <entry key="app/src/main/res/layout/activity_settings.xml" value="0.19375" />
<entry key="app/src/main/res/layout/app_list_item.xml" value="0.2838541666666667" />
<entry key="app/src/main/res/layout/fragment_list.xml" value="0.2838541666666667" />
<entry key="app/src/main/res/menu/bottom_navigation.xml" value="0.2828125" /> <entry key="app/src/main/res/menu/bottom_navigation.xml" value="0.2828125" />
<entry key="app/src/main/res/menu/main_activity_menu.xml" value="0.2838541666666667" /> <entry key="app/src/main/res/menu/main_activity_menu.xml" value="0.2838541666666667" />
</map> </map>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/colorAccent" android:state_checked="true" /> <item android:color="@color/colorAccent" android:state_checked="true" />
<item android:color="@color/black" android:state_checked="false" /> <item android:color="@color/colorTextPrimary" android:state_checked="false" />
</selector> </selector>

View file

@ -24,7 +24,7 @@
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginBottom="0dp" android:layout_marginBottom="0dp"
android:textColor="@color/black" android:textColor="@color/colorTextPrimary"
android:ellipsize="marquee" android:ellipsize="marquee"
app:layout_constraintStart_toEndOf="@id/list_app_icon" app:layout_constraintStart_toEndOf="@id/list_app_icon"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
@ -38,7 +38,7 @@
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:textColor="@color/grey" android:textColor="@color/colorTextSecondary"
android:ellipsize="marquee" android:ellipsize="marquee"
app:layout_constraintStart_toEndOf="@id/list_app_icon" app:layout_constraintStart_toEndOf="@id/list_app_icon"
app:layout_constraintTop_toBottomOf="@id/list_app_title" app:layout_constraintTop_toBottomOf="@id/list_app_title"
@ -50,7 +50,7 @@
android:layout_height="24dp" android:layout_height="24dp"
android:layout_marginTop="28dp" android:layout_marginTop="28dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:textColor="@android:color/white" android:textColor="@color/colorPrimary"
android:textStyle="bold" android:textStyle="bold"
android:background="@drawable/circle_accent" android:background="@drawable/circle_accent"
android:gravity="center" android:gravity="center"

View file

@ -1,17 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/fragment_swipe_refresh" android:id="@+id/fragment_swipe_refresh"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="match_parent">
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -21,4 +16,4 @@
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </FrameLayout>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#00100D</color>
<color name="colorAccent">#009688</color>
<color name="colorAccentSetupWizard">#FFC107</color>
<color name="colorNavigationBar">#004D3F</color>
<color name="colorTextPrimary">#EEEEEE</color>
<color name="colorTextSecondary">#CCCCCC</color>
<color name="disabledAppBackground">#004D3F</color>
<color name="selectedAppBackground">#10201D</color>
<color name="selectedAndDisabledAppBackground">#105D4F</color>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="AppTheme" parent="AppTheme.Override">
<item name="android:windowLightStatusBar">false</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
</style>
</resources>

View file

@ -4,9 +4,9 @@
<color name="colorAccent">#009688</color> <color name="colorAccent">#009688</color>
<color name="colorAccentSetupWizard">#FFC107</color> <color name="colorAccentSetupWizard">#FFC107</color>
<color name="colorNavigationBar">#E0F2F1</color> <color name="colorNavigationBar">#E0F2F1</color>
<color name="black">#333333</color> <color name="colorTextPrimary">#333333</color>
<color name="grey">#999999</color> <color name="colorTextSecondary">#999999</color>
<color name="disabledAppBackground">#E0F2F1</color> <color name="disabledAppBackground">#E0F2F1</color>
<color name="selectedAppBackground">#EEEEEE</color> <color name="selectedAppBackground">#E1E9E8</color>
<color name="selectedAndDisabledAppBackground">#CEE1E0</color> <color name="selectedAndDisabledAppBackground">#CEE1E0</color>
</resources> </resources>

View file

@ -1,14 +1,19 @@
<resources> <resources>
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar"> <style name="AppTheme.Base" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimary</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
<item name="colorOnPrimary">@color/colorTextPrimary</item>
<item name="windowActionModeOverlay">true</item> <item name="windowActionModeOverlay">true</item>
<item name="android:windowLightStatusBar">true</item> <item name="android:windowLightStatusBar">true</item>
<item name="android:colorBackground">@color/colorPrimary</item> <item name="android:colorBackground">@color/colorPrimary</item>
<item name="android:textColor">@color/colorTextPrimary</item>
<item name="android:textColorSecondary">@color/colorTextSecondary</item>
<item name="android:itemBackground">@color/colorPrimary</item>
<item name="android:listViewStyle">@style/ListViewTheme</item>
<item name="android:alertDialogTheme">@style/AlertDialogTheme</item>
</style> </style>
<style name="AppTheme.Override" parent="AppTheme.Base"> <style name="AppTheme.Override" parent="AppTheme.Base">
@ -19,6 +24,21 @@
<!-- Empty; override from specific styles --> <!-- Empty; override from specific styles -->
</style> </style>
<!-- Themes for dialogs and context menus -->
<style name="ListViewTheme" parent="@android:style/Widget.ListView">
<item name="android:background">@color/colorPrimary</item>
</style>
<style name="AlertDialogTheme" parent="Theme.AppCompat.DayNight.Dialog.Alert">
<item name="android:background">@color/colorPrimary</item>
<item name="android:headerBackground">@color/colorPrimary</item>
<item name="android:windowTitleStyle">@style/AlertDialogTitleTextStyle</item>
</style>
<style name="AlertDialogTitleTextStyle" parent="TextAppearance.AppCompat.Title">
<item name="android:background">@color/colorPrimary</item>
</style>
<!-- Theme for ActionBar --> <!-- Theme for ActionBar -->
<!-- Display the text as accent color --> <!-- Display the text as accent color -->
<style name="ToolbarTheme" parent="ThemeOverlay.AppCompat.ActionBar"> <style name="ToolbarTheme" parent="ThemeOverlay.AppCompat.ActionBar">