Fixed Main Settings bottom insets
This commit is contained in:
parent
db6e6a2533
commit
50c7d4aeb7
3 changed files with 7 additions and 1 deletions
|
@ -66,7 +66,6 @@ abstract class AbsSettingsFragment : ATEPreferenceFragmentCompat() {
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
setDivider(ColorDrawable(Color.TRANSPARENT))
|
setDivider(ColorDrawable(Color.TRANSPARENT))
|
||||||
listView.overScrollMode = View.OVER_SCROLL_NEVER
|
|
||||||
// This is a workaround as CollapsingToolbarLayout consumes insets and
|
// This is a workaround as CollapsingToolbarLayout consumes insets and
|
||||||
// insets are not passed to child views
|
// insets are not passed to child views
|
||||||
// https://github.com/material-components/material-components-android/issues/1310
|
// https://github.com/material-components/material-components-android/issues/1310
|
||||||
|
|
|
@ -19,15 +19,18 @@ import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import androidx.core.view.updatePadding
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
import code.name.monkey.retromusic.App
|
import code.name.monkey.retromusic.App
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.databinding.FragmentMainSettingsBinding
|
import code.name.monkey.retromusic.databinding.FragmentMainSettingsBinding
|
||||||
|
import code.name.monkey.retromusic.extensions.addBottomInsets
|
||||||
import code.name.monkey.retromusic.extensions.hide
|
import code.name.monkey.retromusic.extensions.hide
|
||||||
import code.name.monkey.retromusic.extensions.show
|
import code.name.monkey.retromusic.extensions.show
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil
|
import code.name.monkey.retromusic.util.NavigationUtil
|
||||||
|
import code.name.monkey.retromusic.util.RetroUtil
|
||||||
|
|
||||||
class MainSettingsFragment : Fragment(), View.OnClickListener {
|
class MainSettingsFragment : Fragment(), View.OnClickListener {
|
||||||
|
|
||||||
|
@ -84,6 +87,9 @@ class MainSettingsFragment : Fragment(), View.OnClickListener {
|
||||||
binding.buyPremium.setTextColor(it)
|
binding.buyPremium.setTextColor(it)
|
||||||
binding.diamondIcon.imageTintList = ColorStateList.valueOf(it)
|
binding.diamondIcon.imageTintList = ColorStateList.valueOf(it)
|
||||||
}
|
}
|
||||||
|
if (!RetroUtil.isLandscape()) {
|
||||||
|
binding.container.updatePadding(bottom = RetroUtil.getNavigationBarHeight())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
android:transitionGroup="true">
|
android:transitionGroup="true">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
Loading…
Reference in a new issue