Skip to content

Commit

Permalink
Make navigation bar transparent in more devices. (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
Moderpach authored Sep 9, 2023
1 parent 3f04c7f commit ddd7284
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 ddd7284

Please sign in to comment.