fixup! *Activity: Enable edge to edge display for all versions
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -21,6 +21,8 @@ package com.aurora.store.view.ui.onboarding
|
|||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.FragmentManager
|
import androidx.fragment.app.FragmentManager
|
||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
@@ -80,6 +82,13 @@ class OnboardingFragment : BaseFragment<FragmentOnboardingBinding>() {
|
|||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
// Adjust layout margins for edgeToEdge display
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(binding.layoutBottom) { layout, windowInsets ->
|
||||||
|
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
|
layout.setPadding(0, 0, 0, insets.bottom)
|
||||||
|
windowInsets
|
||||||
|
}
|
||||||
|
|
||||||
val isDefaultPrefLoaded = Preferences.getBoolean(requireContext(), PREFERENCE_DEFAULT)
|
val isDefaultPrefLoaded = Preferences.getBoolean(requireContext(), PREFERENCE_DEFAULT)
|
||||||
if (!isDefaultPrefLoaded) {
|
if (!isDefaultPrefLoaded) {
|
||||||
save(PREFERENCE_DEFAULT, true)
|
save(PREFERENCE_DEFAULT, true)
|
||||||
|
|||||||
Reference in New Issue
Block a user