Skip to content

Commit 55e3d93

Browse files
authored
Merge pull request #126 from xLexip/develop
v1.2.1
2 parents 9e0518b + 49b15ba commit 55e3d93

File tree

11 files changed

+157
-107
lines changed

11 files changed

+157
-107
lines changed

README.md

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
1+
[![Latest Version](https://img.shields.io/github/v/release/xLexip/Adaptive-Theme?style=flat&logo=github&label=Release)](https://github.com/xLexip/Adaptive-Theme/releases/latest)
2+
[![Stars](https://img.shields.io/github/stars/xLexip/Adaptive-Theme?style=flat&logo=github&label=Stars)](#)
3+
<a href="https://play.google.com/store/apps/details?id=dev.lexip.hecate&referrer=utm_source%3Dgithub%26utm_medium%3Dreadme_button">
4+
<img
5+
src="https://img.shields.io/endpoint?url=https%3A%2F%2Fplay.cuzi.workers.dev%2Fplay%3Fi%3Ddev.lexip.hecate%26l%3DDownloads%26m%3D%24totalinstalls&color=brightgreen&logo=google-play&logoColor=white"
6+
alt="Play Store Download Count (6k+)">
7+
</a>
8+
19
[![Feature Graphic / Screenshot](.github/resources/feature-graphic.png)](https://play.google.com/store/apps/details?id=dev.lexip.hecate&referrer=utm_source%3Dgithub%26utm_medium%3Dreadme_banner)
210

3-
# Adaptive Theme: Auto Dark Mode by Ambient Light
11+
# Adaptive Theme Auto Dark Mode by Ambient Light
412

5-
Adaptive Theme automatically switches between light and dark mode
6-
using the **ambient light sensor** — not a fixed schedule.
13+
Adaptive Theme automatically switches between light and dark theme
14+
using the ambient light sensor — not a fixed schedule.
715

8-
It adapts to real lighting conditions to optimize **readability**, **eye comfort**, and **battery
16+
It adapts to actual lighting conditions to optimize **readability**, **eye comfort**, and **battery
917
life**.
1018

19+
#### YouTube: [HowToMen – Top 15 Best Android Apps - February 2026](https://www.youtube.com/watch?v=iY3FBMTA15A&t=98s&ref=GitHub_xLexip)
20+
1121
<a href="https://play.google.com/store/apps/details?id=dev.lexip.hecate&referrer=utm_source%3Dgithub%26utm_medium%3Dreadme_button">
1222
<img src=".github/resources/get-it-on-google-play.svg" alt="Get it on Google Play" width="200"/>
1323
</a>
@@ -16,12 +26,10 @@ life**.
1626
<img src=".github/resources/github-releases.png" alt="GitHub Releases" width="200"/>
1727
</a>
1828
‎ ‎ ‎
19-
<a href="https://play.google.com/store/apps/details?id=moe.shizuku.privileged.api&referrer=utm_source%3Dgithub%26utm_medium%3Dxlexip">
29+
<a href="https://play.google.com/store/apps/details?id=moe.shizuku.privileged.api&referrer=utm_source%3Dgithub_xlexip">
2030
<img src=".github/resources/works-with-shizuku.png" alt="Shizuku (PlayStore)" width="200"/>
2131
</a>
2232

23-
### YouTube: [HowToMen – Top 15 Best Android Apps - February 2026](https://www.youtube.com/watch?v=iY3FBMTA15A&t=98s&ref=GitHub_xLexip)
24-
2533
## Quick Start (2 minutes)
2634

2735
1. **Install** Adaptive Theme.
@@ -50,7 +58,7 @@ life**.
5058
* **No Root Required:** Root access is not required (but supported as an alternative setup
5159
method).
5260
* **Shizuku Support:** One of multiple setup options is
53-
using [Shizuku](https://github.com/RikkaApps/Shizuku).
61+
using [Shizuku](https://play.google.com/store/apps/details?id=moe.shizuku.privileged.api&referrer=utm_source%3Dgithub_xlexip).
5462
* **Modern & Native:** Built with best-practices using Kotlin, Jetpack Compose and Material You
5563
for a smooth and solid experience.
5664
* **50+ Languages:** Applied globalization at its best.
@@ -70,7 +78,7 @@ methods to do so:
7078
installation required (WebADB).
7179
👉 **[lexip.dev/setup](https://lexip.dev/setup)**
7280

73-
* **Shizuku** – If you have [Shizuku](https://github.com/RikkaApps/Shizuku) installed and
81+
* **Shizuku** – If you have [Shizuku](https://play.google.com/store/apps/details?id=moe.shizuku.privileged.api&referrer=utm_source%3Dgithub_xlexip) installed and
7482
configured, you can
7583
grant the permission directly within Adaptive Theme.
7684

@@ -115,12 +123,16 @@ To avoid screen flicker and unnecessary background work, Adaptive Theme follows
115123

116124
**My theme doesn’t change — what should I check?**
117125

118-
- Keep in mind that the theme only switched immediately after the screen is turned on, to optimize
126+
* Keep in mind that the theme only switched immediately after the screen is turned on, to optimize
119127
sensor usage and to not interrupt
120128
your device usage.
121-
- Check that your sensor isn’t covered when you turn the screen on.
122-
- Adjust your lux threshold and test in clearly bright/dim conditions.
123-
- Check if the current lux value is shown correctly in the Adaptive Theme app.
129+
* Check that your sensor isn’t covered when you turn the screen on.
130+
* Adjust your lux threshold and test in clearly bright/dim conditions.
131+
* Check if the current lux value is shown correctly in the Adaptive Theme app.
132+
133+
**Does Adaptive Theme work on tablets?**
134+
135+
* No. Due to a technical detail, Adaptive Theme only works on smartphones.
124136

125137
### Support & Feedback
126138

@@ -170,13 +182,13 @@ broadcasts – ensuring zero unnecessary battery drain in the background.
170182

171183
## Credits
172184

173-
* Thanks to Facundo Holzmeister (HowToMen)
174-
for featuring Adaptive Theme in
175-
a [YouTube video](https://youtu.be/iY3FBMTA15A?si=N8aCNyHj7vzRpiiC&t=98).
176-
* Thanks to Abdul
177-
for featuring Adaptive Theme in
178-
a [YouTube video](https://youtu.be/CH_4E1LzGcU?si=BHWwIAIMiiWp6iWf&t=459).
185+
* Thanks to the following YouTubers for featuring Adaptive Theme:
186+
* HowToMen – [**Top 15 Best Android Apps - February 2026**](https://www.youtube.com/watch?v=iY3FBMTA15A&t=98s)
187+
* Mr. Android FHD – [**8 Incredible Apps That Every Android User Needs in 2026**](https://www.youtube.com/watch?v=CH_4E1LzGcU&t=459s)
188+
* El Androide Feliz – [**15 nuevas apps para Shizuku que son bestiales**](https://www.youtube.com/watch?v=eMznsQhldEw&t=152s)
189+
* Всё про Андроид – [**Светлая и тёмная тема по датчику освещённости**](https://www.youtube.com/watch?v=Oj-WHpc5vK8)
179190
* Thanks to [AlbertCaro](https://github.com/xLexip/Adaptive-Theme/pull/107) for spanish translation
180191
strings.
192+
* Font Credits: [Nunito](https://github.com/googlefonts/nunito), SIL Open Font License, Version 1.1, Copyright 2014 The Nunito Project Authors
181193

182194
### **Made with 🥨 in Germany.**

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ android {
1616
applicationId = "dev.lexip.hecate"
1717
minSdk = 34
1818
targetSdk = 35
19-
versionCode = 106
20-
versionName = "1.2.0"
19+
versionCode = 113
20+
versionName = "1.2.1"
2121
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2222
}
2323

app/src/foss/kotlin/dev/lexip/hecate/util/InAppReviewHandler.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ import android.app.Activity
1616

1717
object InAppReviewHandler {
1818

19-
fun setReviewPending() {
20-
// No-op for FOSS flavor
21-
}
22-
23-
fun checkAndTriggerReview(activity: Activity) {
19+
fun triggerReview(activity: Activity) {
2420
// No-op for FOSS flavor
2521
}
2622
}
27-

app/src/main/kotlin/dev/lexip/hecate/ui/AppNavHost.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ fun AppNavHost(
9999
is CopyToClipboard -> {
100100
// Let UI handle copying to clipboard if needed
101101
}
102+
103+
is RequestInAppReview -> {
104+
// Handled by MainScreen
105+
}
102106
}
103107
}
104108
}
@@ -274,4 +278,3 @@ private fun rememberSetupViewModel(
274278
return viewModel
275279
}
276280

277-

app/src/main/kotlin/dev/lexip/hecate/ui/MainActivity.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import dev.lexip.hecate.services.BroadcastReceiverService
2525
import dev.lexip.hecate.ui.navigation.NavigationManager
2626
import dev.lexip.hecate.ui.theme.HecateTheme
2727
import dev.lexip.hecate.util.DarkThemeHandler
28-
import dev.lexip.hecate.util.InAppReviewHandler
2928
import dev.lexip.hecate.util.InAppUpdateManager
3029
import dev.lexip.hecate.util.InstallSourceChecker
3130

@@ -75,8 +74,6 @@ class MainActivity : ComponentActivity() {
7574
override fun onResume() {
7675
super.onResume()
7776

78-
InAppReviewHandler.checkAndTriggerReview(this)
79-
8077
inAppUpdateManager?.resumeImmediateUpdateIfNeeded()
8178
inAppUpdateManager?.resumeFlexibleUpdateIfNeeded()
8279

app/src/main/kotlin/dev/lexip/hecate/ui/MainScreen.kt

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
package dev.lexip.hecate.ui
1414

1515
import android.Manifest
16+
import android.app.Activity
1617
import android.content.ClipData
1718
import android.content.ClipboardManager
1819
import android.content.pm.PackageManager
@@ -22,8 +23,8 @@ import androidx.compose.animation.core.Animatable
2223
import androidx.compose.animation.core.tween
2324
import androidx.compose.animation.fadeIn
2425
import androidx.compose.animation.fadeOut
25-
import androidx.compose.animation.slideInVertically
26-
import androidx.compose.animation.slideOutVertically
26+
import androidx.compose.animation.slideInHorizontally
27+
import androidx.compose.animation.slideOutHorizontally
2728
import androidx.compose.foundation.isSystemInDarkTheme
2829
import androidx.compose.foundation.layout.Arrangement
2930
import androidx.compose.foundation.layout.Column
@@ -72,6 +73,7 @@ import dev.lexip.hecate.ui.components.preferences.CustomThresholdDialog
7273
import dev.lexip.hecate.ui.components.preferences.ProgressDetailCard
7374
import dev.lexip.hecate.ui.components.preferences.SliderDetailCard
7475
import dev.lexip.hecate.ui.theme.hecateTopAppBarColors
76+
import dev.lexip.hecate.util.InAppReviewHandler
7577
import dev.lexip.hecate.util.shizuku.ShizukuAvailability
7678

7779
private val ScreenHorizontalMargin = 20.dp
@@ -132,6 +134,13 @@ fun MainScreen(
132134
is NavigateToSetup -> {
133135
// Handled by MainActivity
134136
}
137+
138+
is RequestInAppReview -> {
139+
val activity = context as? Activity
140+
if (activity != null) {
141+
InAppReviewHandler.triggerReview(activity)
142+
}
143+
}
135144
}
136145
}
137146
}
@@ -206,6 +215,34 @@ fun MainScreen(
206215
)
207216
}
208217

218+
// Device-covered warning when the proximity sensor reports covered
219+
AnimatedVisibility(
220+
visible = internalUiState.isDeviceCovered && uiState.adaptiveThemeEnabled,
221+
enter = fadeIn() + slideInHorizontally(initialOffsetX = { it }),
222+
exit = fadeOut() + slideOutHorizontally(targetOffsetX = { it })
223+
) {
224+
Card(
225+
modifier = Modifier
226+
.fillMaxWidth(),
227+
colors = CardDefaults.cardColors(
228+
containerColor = MaterialTheme.colorScheme.errorContainer,
229+
contentColor = MaterialTheme.colorScheme.onErrorContainer
230+
),
231+
shape = RoundedCornerShape(20.dp)
232+
) {
233+
Column(modifier = Modifier.padding(16.dp)) {
234+
Text(
235+
text = stringResource(id = R.string.device_covered_title),
236+
style = MaterialTheme.typography.titleMedium
237+
)
238+
Spacer(modifier = Modifier.padding(top = 4.dp))
239+
Text(
240+
text = stringResource(id = R.string.device_covered_message),
241+
style = MaterialTheme.typography.bodyMedium
242+
)
243+
}
244+
}
245+
}
209246

210247
// Setup card shown when the required permission has not been granted yet
211248
if (!hasWriteSecureSettingsPermission) {
@@ -297,34 +334,6 @@ fun MainScreen(
297334

298335
}
299336

300-
// Device-covered warning when the proximity sensor reports covered
301-
AnimatedVisibility(
302-
visible = internalUiState.isDeviceCovered && uiState.adaptiveThemeEnabled,
303-
enter = fadeIn() + slideInVertically(initialOffsetY = { it / 2 }),
304-
exit = fadeOut() + slideOutVertically(targetOffsetY = { it / 2 })
305-
) {
306-
Card(
307-
modifier = Modifier
308-
.fillMaxWidth(),
309-
colors = CardDefaults.cardColors(
310-
containerColor = MaterialTheme.colorScheme.errorContainer,
311-
contentColor = MaterialTheme.colorScheme.onErrorContainer
312-
),
313-
shape = RoundedCornerShape(20.dp)
314-
) {
315-
Column(modifier = Modifier.padding(16.dp)) {
316-
Text(
317-
text = stringResource(id = R.string.device_covered_title),
318-
style = MaterialTheme.typography.titleMedium
319-
)
320-
Spacer(modifier = Modifier.padding(top = 4.dp))
321-
Text(
322-
text = stringResource(id = R.string.device_covered_message),
323-
style = MaterialTheme.typography.bodyMedium
324-
)
325-
}
326-
}
327-
}
328337
Spacer(modifier = Modifier.padding(bottom = 4.dp))
329338
}
330339
}

0 commit comments

Comments
 (0)