diff --git a/app/build.gradle b/app/build.gradle
index c8fc707..6e52d18 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -63,8 +63,10 @@ dependencies {
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
implementation "androidx.navigation:navigation-compose:2.6.0-alpha04"
- implementation 'com.google.accompanist:accompanist-permissions:0.22.0-rc'
- implementation 'com.google.accompanist:accompanist-insets:0.22.0-rc'
+ implementation 'com.google.accompanist:accompanist-permissions:0.23.1'
+ implementation 'com.google.accompanist:accompanist-insets:0.23.1'
+
+ implementation "com.google.accompanist:accompanist-systemuicontroller:0.23.1"
implementation 'com.github.squti:Android-Wave-Recorder:1.7.0'
implementation("com.squareup.okhttp3:okhttp:4.9.3")
diff --git a/app/src/main/java/ch/broillet/jarvis/android/MainActivity.kt b/app/src/main/java/ch/broillet/jarvis/android/MainActivity.kt
index 0cf2559..bbcbc59 100644
--- a/app/src/main/java/ch/broillet/jarvis/android/MainActivity.kt
+++ b/app/src/main/java/ch/broillet/jarvis/android/MainActivity.kt
@@ -4,21 +4,15 @@ import android.os.Bundle
import android.view.WindowManager
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
-import androidx.compose.animation.core.withInfiniteAnimationFrameMillis
-import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
-import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.ui.Modifier
-import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.core.view.WindowCompat
-import androidx.core.view.WindowInsetsControllerCompat
import ch.broillet.jarvis.android.nav.Navigation
import ch.broillet.jarvis.android.ui.theme.JarvisclientappTheme
-import com.google.android.material.elevation.SurfaceColors
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
@@ -26,12 +20,18 @@ class MainActivity : ComponentActivity() {
setContent {
JarvisclientappTheme {
- window.navigationBarColor = MaterialTheme.colorScheme.background.hashCode() // Set color of system navigationBar same as BottomNavigationView
+
+ // Fullscreen
+ WindowCompat.setDecorFitsSystemWindows(window, false)
+ window.setFlags(
+ WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
+ WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+ )
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
- color = MaterialTheme.colorScheme.surface
+ color = MaterialTheme.colorScheme.background
) {
DefaultPreview()
}
diff --git a/app/src/main/java/ch/broillet/jarvis/android/ui/theme/Theme.kt b/app/src/main/java/ch/broillet/jarvis/android/ui/theme/Theme.kt
index a048d15..6bf49ca 100644
--- a/app/src/main/java/ch/broillet/jarvis/android/ui/theme/Theme.kt
+++ b/app/src/main/java/ch/broillet/jarvis/android/ui/theme/Theme.kt
@@ -3,17 +3,13 @@ package ch.broillet.jarvis.android.ui.theme
import android.app.Activity
import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
-import androidx.compose.material3.MaterialTheme
-import androidx.compose.material3.darkColorScheme
-import androidx.compose.material3.dynamicDarkColorScheme
-import androidx.compose.material3.dynamicLightColorScheme
-import androidx.compose.material3.lightColorScheme
+import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
-import androidx.compose.ui.graphics.toArgb
+import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
-import androidx.core.view.ViewCompat
+import androidx.core.view.WindowCompat
private val DarkColorScheme = darkColorScheme(
primary = md_theme_dark_primary,
@@ -80,6 +76,7 @@ fun JarvisclientappTheme(
dynamicColor: Boolean = true,
content: @Composable () -> Unit
) {
+
val colorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
@@ -88,11 +85,15 @@ fun JarvisclientappTheme(
darkTheme -> DarkColorScheme
else -> LightColorScheme
}
+
val view = LocalView.current
if (!view.isInEditMode) {
SideEffect {
- (view.context as Activity).window.statusBarColor = colorScheme.primary.toArgb()
- ViewCompat.getWindowInsetsController(view)?.isAppearanceLightStatusBars = darkTheme
+ (view.context as Activity).window.statusBarColor = Color.Transparent.hashCode()
+ WindowCompat.getInsetsController(
+ (view.context as Activity).window,
+ view
+ ).isAppearanceLightStatusBars = !darkTheme
}
}
diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml
similarity index 100%
rename from app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to app/src/main/res/drawable/ic_launcher_foreground.xml
diff --git a/app/src/main/res/drawable/logo_transparent.xml b/app/src/main/res/drawable/logo_transparent.xml
new file mode 100644
index 0000000..51bbab6
--- /dev/null
+++ b/app/src/main/res/drawable/logo_transparent.xml
@@ -0,0 +1,1476 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index 37bf295..0000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png b/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png
deleted file mode 100644
index bf11404..0000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png b/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png
deleted file mode 100644
index b16ffbe..0000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index a1be3b4..0000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png b/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png
deleted file mode 100644
index f04c39e..0000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png b/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png
deleted file mode 100644
index 7fa019e..0000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 6e0f87c..0000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png
deleted file mode 100644
index 0997894..0000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png
deleted file mode 100644
index 1bbe7d6..0000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 4f1b8a4..0000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png
deleted file mode 100644
index b02523e..0000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index 689cb4f..0000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png
deleted file mode 100644
index 06723cf..0000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap/ic_launcher.xml
similarity index 76%
rename from app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to app/src/main/res/mipmap/ic_launcher.xml
index 90f9580..9f5ee20 100644
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/app/src/main/res/mipmap/ic_launcher.xml
@@ -2,4 +2,5 @@
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png b/app/src/main/res/mipmap/ic_launcher_adaptive_back.png
similarity index 100%
rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png
rename to app/src/main/res/mipmap/ic_launcher_adaptive_back.png
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png b/app/src/main/res/mipmap/ic_launcher_adaptive_fore.png
similarity index 100%
rename from app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png
rename to app/src/main/res/mipmap/ic_launcher_adaptive_fore.png