app: remove custom edge to edge setup

I think this conflicts with the weird default behavior of Android 15.
This commit is contained in:
Alexander Capehart
2025-01-13 11:56:46 -07:00
parent 10aaf0afd2
commit f134d3e11b
8 changed files with 4 additions and 75 deletions
@@ -21,6 +21,7 @@ package org.oxycblt.auxio
import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
@@ -56,12 +57,12 @@ class MainActivity : AppCompatActivity() {
@Inject lateinit var uiSettings: UISettings
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
setupTheme()
// Inflate the views after setting up the theme so that the theme attributes are applied.
val binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
setupEdgeToEdge(binding.root)
L.d("Activity created")
}
@@ -98,17 +99,6 @@ class MainActivity : AppCompatActivity() {
}
}
private fun setupEdgeToEdge(contentView: View) {
WindowCompat.setDecorFitsSystemWindows(window, false)
contentView.setOnApplyWindowInsetsListener { view, insets ->
// Automatically inset the view to the left/right, as component support for
// these insets are highly lacking.
val bars = insets.systemBarInsetsCompat
view.updatePadding(left = bars.left, right = bars.right)
insets
}
}
/**
* Transform an [Intent] given to [MainActivity] into a [DeferredPlayback] that can be used in
* the playback system.