Skip to content

Commit

Permalink
Merge branch 'fix-edge-to-edge-warning'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Dec 9, 2024
2 parents 018fe96 + 897f04a commit 3232f1b
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package net.mullvad.mullvadvpn.ui

import android.content.Intent
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.activity.result.contract.ActivityResultContracts
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.core.view.WindowCompat
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
Expand Down Expand Up @@ -59,9 +61,10 @@ class MainActivity : ComponentActivity(), AndroidScopeComponent {
!isReady
}

// Tell the system that we will draw behind the status bar and navigation bar
// This needs to be called after installSplashScreen()
WindowCompat.setDecorFitsSystemWindows(window, false)
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.dark(Color.TRANSPARENT),
navigationBarStyle = SystemBarStyle.dark(Color.TRANSPARENT),
)

super.onCreate(savedInstanceState)

Expand Down

0 comments on commit 3232f1b

Please sign in to comment.