Skip to content

Commit

Permalink
Revert "Remove enableEdgeToEdge"
Browse files Browse the repository at this point in the history
This reverts commit b9aa9c3.
  • Loading branch information
mickael-menu committed Nov 4, 2024
1 parent 5e45b54 commit a99d605
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test-app/src/main/java/org/readium/r2/testapp/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
package org.readium.r2.testapp

import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.AppBarConfiguration
Expand All @@ -24,7 +27,13 @@ class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContentView(R.layout.activity_main)
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.container)) { v, insets ->
val statusBars = insets.getInsets(WindowInsetsCompat.Type.statusBars())
v.setPadding(statusBars.left, statusBars.top, statusBars.right, statusBars.bottom)
insets
}

val navView: BottomNavigationView = findViewById(R.id.nav_view)
val navHostFragment =
Expand Down

0 comments on commit a99d605

Please sign in to comment.