From c95c766d5169a47f2354c570fe861bc9f26b6276 Mon Sep 17 00:00:00 2001 From: Nikolay Odegov Date: Tue, 18 Feb 2025 20:34:49 +0300 Subject: [PATCH] change statusbar color --- .idea/.name | 1 + .idea/deploymentTargetSelector.xml | 3 --- .idea/misc.xml | 1 - .idea/vcs.xml | 6 ++++++ .../main/java/com/nto/presentation/MainActivity.kt | 13 ++++++------- 5 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 .idea/.name create mode 100644 .idea/vcs.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..06d0912 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +Onomatopoeia-front \ No newline at end of file diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml index 4486e6b..357c545 100644 --- a/.idea/deploymentTargetSelector.xml +++ b/.idea/deploymentTargetSelector.xml @@ -2,9 +2,6 @@ - - diff --git a/.idea/misc.xml b/.idea/misc.xml index 74dd639..b2c751a 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/presentation/src/main/java/com/nto/presentation/MainActivity.kt b/presentation/src/main/java/com/nto/presentation/MainActivity.kt index 7a23114..42acf3b 100644 --- a/presentation/src/main/java/com/nto/presentation/MainActivity.kt +++ b/presentation/src/main/java/com/nto/presentation/MainActivity.kt @@ -1,15 +1,19 @@ package com.nto.presentation +import android.app.Activity import android.os.Build import android.os.Bundle import android.view.WindowInsets import androidx.activity.ComponentActivity +import androidx.activity.compose.LocalActivity import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.material3.Scaffold import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.toArgb +import androidx.compose.ui.platform.LocalContext import androidx.navigation.compose.rememberNavController import com.nto.presentation.composable.Navigation import com.nto.presentation.theme.NTOTheme @@ -20,15 +24,10 @@ import dagger.hilt.android.AndroidEntryPoint class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - enableEdgeToEdge() - actionBar?.hide() - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { - window.insetsController?.hide(WindowInsets.Type.statusBars()) - } setContent { NTOTheme { - //XML SUCKS! We use Jetpack Compose btw :> - + //XML SUCKS! We use Jetpack Compose btw :>- + this.window.statusBarColor = NTOTheme.colors.primaryText.toArgb() Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding -> val navController = rememberNavController() Navigation(