Skip to content

Commit

Permalink
run spotlessApply
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkoren committed Aug 29, 2024
1 parent 139d0ba commit d8f53e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import android.os.Bundle
import android.view.WindowInsetsController
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.core.content.pm.ShortcutManagerCompat
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
Expand All @@ -36,7 +35,6 @@ class MainActivity : ComponentActivity() {
installSplashScreen()
super.onCreate(savedInstanceState)
setContent {

// setSystemBarAppearance can be removed after calling enableEdgeToEdge()
setSystemBarAppearance(isSystemInDarkTheme())

Expand All @@ -55,16 +53,17 @@ class MainActivity : ComponentActivity() {
return ShortcutParams(shortcutId, text)
}

private fun setSystemBarAppearance(isSystemInDarkTheme : Boolean) {
private fun setSystemBarAppearance(isSystemInDarkTheme: Boolean) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (isSystemInDarkTheme) {
window?.insetsController?.setSystemBarsAppearance(
0, WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
0,
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
)
} else {
window?.insetsController?.setSystemBarsAppearance(
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ import android.app.Activity
import android.content.Intent
import android.content.pm.ActivityInfo
import android.os.Bundle
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.scaleIn
import androidx.compose.animation.scaleOut
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
Expand Down

0 comments on commit d8f53e9

Please sign in to comment.