Skip to content

Commit

Permalink
Adjust theming of Android system bars
Browse files Browse the repository at this point in the history
  • Loading branch information
opatry committed Oct 5, 2024
1 parent e5ce33e commit 8eb3ebc
Show file tree
Hide file tree
Showing 8 changed files with 308 additions and 6 deletions.
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ksp = "2.0.20-1.0.24"
coroutines = "1.9.0"
ktor = "3.0.0-rc-2"
compose-plugin = "1.7.0-rc01"
material = "1.12.0"
room = "2.7.0-alpha09"
sqlite = "2.5.0-alpha09"
koin = "4.0.0"
Expand Down Expand Up @@ -58,6 +59,7 @@ coil-network = { module = "io.coil-kt.coil3:coil-network-ktor2", version.ref = "

androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.7.0" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version = "1.9.2" }
material = { module = "com.google.android.material:material", version.ref = "material" }

firebase-bom = { module = "com.google.firebase:firebase-bom", version = "33.4.0" }
firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics" }
Expand Down
3 changes: 3 additions & 0 deletions tasks-app-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ dependencies {
implementation(libs.koin.compose.viewmodel)

implementation(compose.material3)
implementation(libs.material) {
because("need Material3 App theme")
}
implementation(libs.androidx.activity.compose)

implementation(libs.androidx.appcompat)
Expand Down
203 changes: 201 additions & 2 deletions tasks-app-android/src/main/assets/licenses_android.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,20 @@
"Apache-2.0"
]
},
{
"uniqueId": "androidx.cardview:cardview",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.0.0",
"description": "Android Support CardView v7",
"name": "Support CardView v7",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "androidx.collection:collection-jvm",
"developers": [
Expand Down Expand Up @@ -532,6 +546,48 @@
"Apache-2.0"
]
},
{
"uniqueId": "androidx.constraintlayout:constraintlayout",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "2.0.1",
"description": "ConstraintLayout for Android",
"name": "Android ConstraintLayout",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "androidx.constraintlayout:constraintlayout-solver",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "2.0.1",
"description": "Solver for ConstraintLayout",
"name": "Android ConstraintLayout Solver",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "androidx.coordinatorlayout:coordinatorlayout",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.1.0",
"description": "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later.",
"name": "Support Coordinator Layout",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "androidx.core:core",
"developers": [
Expand Down Expand Up @@ -587,7 +643,7 @@
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.0.0",
"artifactVersion": "1.1.0",
"description": "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later.",
"name": "Support Custom View",
"licenses": [
Expand Down Expand Up @@ -665,19 +721,47 @@
]
},
{
"uniqueId": "androidx.drawerlayout:drawerlayout",
"uniqueId": "androidx.documentfile:documentfile",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.0.0",
"description": "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later.",
"name": "Support Document File",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "androidx.drawerlayout:drawerlayout",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.1.1",
"description": "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later.",
"name": "Support Drawer Layout",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "androidx.dynamicanimation:dynamicanimation",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.0.0",
"description": "Physics-based animation in support library, where the animations are driven by physics force. You can use this Animation library to create smooth and realistic animations.",
"name": "Support DynamicAnimation",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "androidx.emoji2:emoji2",
"developers": [
Expand Down Expand Up @@ -785,6 +869,20 @@
"Apache-2.0"
]
},
{
"uniqueId": "androidx.legacy:legacy-support-core-utils",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.0.0",
"description": "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later.",
"name": "Support core utils",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "androidx.lifecycle:lifecycle-common-java8",
"developers": [
Expand Down Expand Up @@ -1054,6 +1152,34 @@
"Apache-2.0"
]
},
{
"uniqueId": "androidx.localbroadcastmanager:localbroadcastmanager",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.0.0",
"description": "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later.",
"name": "Support Local Broadcast Manager",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "androidx.print:print",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.0.0",
"description": "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later.",
"name": "Support Print",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "androidx.profileinstaller:profileinstaller",
"developers": [
Expand All @@ -1068,6 +1194,20 @@
"Apache-2.0"
]
},
{
"uniqueId": "androidx.recyclerview:recyclerview",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.1.0",
"description": "Android Support RecyclerView v7",
"name": "Support RecyclerView v7",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "androidx.resourceinspection:resourceinspection-annotation",
"developers": [
Expand Down Expand Up @@ -1240,6 +1380,23 @@
"Apache-2.0"
]
},
{
"uniqueId": "androidx.transition:transition",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.5.0",
"description": "Android Transition Support Library",
"name": "Transition",
"licenses": [
"Apache-2.0"
],
"organization": {
"name": "The Android Open Source Project"
}
},
{
"uniqueId": "androidx.vectordrawable:vectordrawable",
"developers": [
Expand Down Expand Up @@ -1282,6 +1439,20 @@
"Apache-2.0"
]
},
{
"uniqueId": "androidx.viewpager2:viewpager2",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.0.0",
"description": "AndroidX Widget ViewPager2",
"name": "AndroidX Widget ViewPager2",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "androidx.viewpager:viewpager",
"developers": [
Expand Down Expand Up @@ -1554,6 +1725,20 @@
"ASDKL"
]
},
{
"uniqueId": "com.google.android.material:material",
"developers": [
{
"name": "The Android Open Source Project"
}
],
"artifactVersion": "1.12.0",
"description": "Material Components for Android is a static library that you can add to your Android application in order to use APIs that provide implementations of the Material Design specification. Compatible on devices running API 14 or later.",
"name": "Material Components for Android",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "com.google.errorprone:error_prone_annotations",
"developers": [
Expand Down Expand Up @@ -2328,6 +2513,20 @@
"Apache-2.0"
]
},
{
"uniqueId": "org.jetbrains.kotlin:kotlin-bom",
"developers": [
{
"name": "JetBrains Team"
}
],
"artifactVersion": "1.8.22",
"description": "Kotlin is a statically typed programming language that compiles to JVM byte codes and JavaScript",
"name": "Kotlin Libraries bill-of-materials",
"licenses": [
"Apache-2.0"
]
},
{
"uniqueId": "org.jetbrains.kotlin:kotlin-reflect",
"developers": [
Expand Down
25 changes: 25 additions & 0 deletions tasks-app-android/src/main/res/values-night/bools.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright (c) 2024 Olivier Patry
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->

<resources>
<bool name="light_status_bar">false</bool>
</resources>
32 changes: 32 additions & 0 deletions tasks-app-android/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright (c) 2024 Olivier Patry
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->

<resources>
<!--
To be kept in sync with Compose counterparts `Color.kt` & `Theme.kt` in `:tasks-app-shared`
-->

<!-- FIXME Material3 theme -->
<color name="primary">#FFFFFFFF</color>

<color name="surface_color">#FF222222</color>
</resources>
Loading

0 comments on commit 8eb3ebc

Please sign in to comment.