storage: demo: Adjust for edge to edge support
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
parent
bfdb297ca4
commit
d86ecd303d
1 changed files with 12 additions and 0 deletions
|
@ -8,6 +8,11 @@ package de.grobox.storagebackuptester
|
|||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener
|
||||
import androidx.core.view.WindowCompat.setDecorFitsSystemWindows
|
||||
import androidx.core.view.WindowInsetsCompat.CONSUMED
|
||||
import androidx.core.view.WindowInsetsCompat.Type.displayCutout
|
||||
import androidx.core.view.WindowInsetsCompat.Type.systemBars
|
||||
import de.grobox.storagebackuptester.crypto.KeyManager
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
|
@ -16,6 +21,13 @@ class MainActivity : AppCompatActivity() {
|
|||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
setDecorFitsSystemWindows(window, false)
|
||||
setOnApplyWindowInsetsListener(window.decorView.rootView) { v, windowInsets ->
|
||||
val insets = windowInsets.getInsets(systemBars() or displayCutout())
|
||||
v.setPadding(insets.left, insets.top, insets.right, insets.bottom)
|
||||
CONSUMED
|
||||
}
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.container, LogFragment.newInstance())
|
||||
|
|
Loading…
Reference in a new issue