Skip to content

Commit 303f658

Browse files
authored
Merge pull request #180 from irgaly/refactor_sample
Refactor: sample app
2 parents 695cdcb + 2317ca7 commit 303f658

File tree

5 files changed

+10
-17
lines changed

5 files changed

+10
-17
lines changed

sample/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ plugins {
77

88
android {
99
namespace = "org.sample.app"
10-
compileSdk = 35
10+
compileSdk = 36
1111
defaultConfig {
1212
applicationId = "org.sample.app"
1313
minSdk = 26
14-
targetSdk = 35
14+
targetSdk = 36
1515
versionCode = 1
1616
versionName = "1.0.0"
1717
}

sample/sample-sub/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55

66
android {
77
namespace = "org.sample.app.sample.sub"
8-
compileSdk = 33
8+
compileSdk = 34
99
defaultConfig {
1010
minSdk = 26
1111
}

sample/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
xmlns:tools="http://schemas.android.com/tools">
33
<application
4-
android:allowBackup="true"
54
android:label="@string/app_name"
65
android:supportsRtl="true"
76
android:theme="@style/Theme.App"

sample/src/main/kotlin/org/sample/app/MainActivity.kt

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
11
package org.sample.app
22

33
import android.os.Bundle
4+
import androidx.activity.ComponentActivity
45
import androidx.activity.compose.setContent
5-
import androidx.appcompat.app.AppCompatActivity
6+
import androidx.activity.enableEdgeToEdge
67
import androidx.compose.foundation.layout.Box
78
import androidx.compose.foundation.layout.fillMaxSize
89
import androidx.compose.material3.MaterialTheme
910
import androidx.compose.material3.Text
1011
import androidx.compose.runtime.LaunchedEffect
1112
import androidx.compose.ui.Alignment
1213
import androidx.compose.ui.Modifier
13-
import androidx.compose.ui.graphics.Color
14-
import androidx.compose.ui.graphics.toArgb
15-
import androidx.core.view.WindowCompat
1614
import androidx.core.view.WindowInsetsControllerCompat
1715

1816
@Suppress("UNUSED_VARIABLE", "LocalVariableName")
19-
class MainActivity : AppCompatActivity() {
17+
class MainActivity : ComponentActivity() {
2018
override fun onCreate(savedInstanceState: Bundle?) {
2119
super.onCreate(savedInstanceState)
22-
WindowCompat.setDecorFitsSystemWindows(window, false)
23-
window.statusBarColor = Color.Transparent.toArgb()
24-
window.navigationBarColor = Color.Transparent.toArgb()
25-
WindowInsetsControllerCompat(
26-
window,
27-
findViewById(android.R.id.content)
28-
).isAppearanceLightStatusBars = true
20+
enableEdgeToEdge()
21+
WindowInsetsControllerCompat(window, window.decorView).isAppearanceLightStatusBars = true
2922
setContent {
3023
MaterialTheme {
3124
LaunchedEffect(Unit) {
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<resources>
2-
<style name="Theme.App" parent="Theme.AppCompat.DayNight.NoActionBar">
2+
3+
<style name="Theme.App" parent="android:Theme.Material.Light.NoActionBar">
34
<item name="colorPrimary">@color/purple_500</item>
45
</style>
56
</resources>

0 commit comments

Comments
 (0)