Skip to content

Commit

Permalink
Make navigation bar transparent in more devices.
Browse files Browse the repository at this point in the history
  • Loading branch information
Moderpach committed Aug 23, 2023
1 parent b0e6ef5 commit 34d96db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/main/java/me/ash/reader/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package me.ash.reader

import android.os.Build
import android.os.Bundle
import android.util.Log
import android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
import android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.runtime.CompositionLocalProvider
Expand Down Expand Up @@ -33,6 +36,9 @@ class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
WindowCompat.setDecorFitsSystemWindows(window, false)
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
window.addFlags(FLAG_LAYOUT_IN_SCREEN or FLAG_LAYOUT_NO_LIMITS)
}
Log.i("RLog", "onCreate: ${ProfileInstallerInitializer().create(this)}")

// Set the language
Expand Down

0 comments on commit 34d96db

Please sign in to comment.