mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 08:17:04 +05:30
android: use Platform material theme
This commit is contained in:
parent
bbc9dc4638
commit
8e243359ab
5 changed files with 26 additions and 4 deletions
|
@ -6,12 +6,11 @@
|
|||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<application
|
||||
android:label="Claw"
|
||||
android:allowBackup="false"
|
||||
android:supportsRtl="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:name=".ClawApplication"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
|
||||
android:theme="@style/Theme.Claw"
|
||||
>
|
||||
<activity android:name=".MainActivity" android:exported="true">
|
||||
<intent-filter>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package dev.msfjarvis.claw.android
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
|
@ -29,7 +29,7 @@ import dev.msfjarvis.claw.common.urllauncher.UrlLauncher
|
|||
import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
class MainActivity : AppCompatActivity() {
|
||||
class MainActivity : ComponentActivity() {
|
||||
@Inject lateinit var api: LobstersApi
|
||||
|
||||
@Inject lateinit var urlLauncher: UrlLauncher
|
||||
|
|
5
android/src/main/res/values-night/bools.xml
Normal file
5
android/src/main/res/values-night/bools.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml
|
||||
version="1.0" encoding="utf-8" ?>
|
||||
<resources>
|
||||
<bool name="use_light_status_bar">false</bool>
|
||||
</resources>
|
5
android/src/main/res/values/bools.xml
Normal file
5
android/src/main/res/values/bools.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml
|
||||
version="1.0" encoding="utf-8" ?>
|
||||
<resources>
|
||||
<bool name="use_light_status_bar">true</bool>
|
||||
</resources>
|
13
android/src/main/res/values/themes.xml
Normal file
13
android/src/main/res/values/themes.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<resources>
|
||||
|
||||
<style name="Platform.Theme.Claw" parent="android:Theme.Material.Light.NoActionBar" />
|
||||
|
||||
<style name="Base.Theme.Claw" parent="Platform.Theme.Claw">
|
||||
<item name="android:windowActionModeOverlay">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Claw" parent="Base.Theme.Claw">
|
||||
<item name="android:windowLightStatusBar">@bool/use_light_status_bar</item>
|
||||
</style>
|
||||
</resources>
|
Loading…
Add table
Add a link
Reference in a new issue