From 0b66cd9e89eb826dcd067f9ed7c90ba2bbd8f784 Mon Sep 17 00:00:00 2001 From: Sal7one Date: Mon, 14 Mar 2022 00:49:26 +0300 Subject: [PATCH] added app bar color --- .../main/java/com/sal7one/musicswitcher/compose/MainUi.kt | 5 +++++ Android/app/src/main/res/values/colors.xml | 1 + 2 files changed, 6 insertions(+) diff --git a/Android/app/src/main/java/com/sal7one/musicswitcher/compose/MainUi.kt b/Android/app/src/main/java/com/sal7one/musicswitcher/compose/MainUi.kt index 7078a20..8ee6115 100644 --- a/Android/app/src/main/java/com/sal7one/musicswitcher/compose/MainUi.kt +++ b/Android/app/src/main/java/com/sal7one/musicswitcher/compose/MainUi.kt @@ -4,12 +4,17 @@ import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.compose.material.Scaffold +import androidx.compose.ui.graphics.toArgb +import androidx.core.content.ContextCompat +import com.sal7one.musicswitcher.R +import com.sal7one.musicswitcher.compose.ui.theme.AppPrimary_color import com.sal7one.musicswitcher.compose.ui.theme.MusicSwitcherTheme class MainUi : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { + this.window.statusBarColor = ContextCompat.getColor(this, R.color.appbarColor) MusicSwitcherTheme { // A surface container using the 'background' color from the theme Scaffold( diff --git a/Android/app/src/main/res/values/colors.xml b/Android/app/src/main/res/values/colors.xml index f8c6127..067bc3c 100644 --- a/Android/app/src/main/res/values/colors.xml +++ b/Android/app/src/main/res/values/colors.xml @@ -7,4 +7,5 @@ #FF018786 #FF000000 #FFFFFFFF + #FF240141 \ No newline at end of file