Skip to content

Commit

Permalink
Fix for status bar icon colors (#1449)
Browse files Browse the repository at this point in the history
JetLagged only supports a light theme, which means the status bar icons
should always use a light theme (meaning they have to be dark). I added
the statusBarStyle to the enableEdgeToEdge call to force a light theme.
The bottom nav also needs to be fixed but that's more involved because
every screen needs to have enough padding to push the content into view
when scrolled.
  • Loading branch information
IanGClifton authored Aug 27, 2024
2 parents c9542d6 + 0c1b070 commit 9bff493
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@

package com.example.jetlagged

import android.graphics.Color
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
Expand All @@ -28,7 +30,9 @@ class MainActivity : ComponentActivity() {

@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.light(Color.TRANSPARENT, Color.TRANSPARENT),
)
super.onCreate(savedInstanceState)
setContent {
val windowSizeClass = calculateWindowSizeClass(this)
Expand Down

0 comments on commit 9bff493

Please sign in to comment.