remove huge gap in non-edge-to-edge devices with bottom bar in cards and cards manage screen
Auto Tag on Version Change / check-version (push) Successful in 13s

This commit is contained in:
2026-06-13 18:05:10 +05:00
parent 98990544fc
commit 5b5f776715
@@ -155,12 +155,11 @@ class CardsFragment : Fragment() {
}
})
ViewCompat.setOnApplyWindowInsetsListener(binding.contentLayout) { v, insets ->
val isBottomNav = requireContext().getSharedPreferences("prefs", Context.MODE_PRIVATE)
.getBoolean("bottom_nav", false)
val navBar = insets.getInsets(WindowInsetsCompat.Type.systemBars())
val extraBottom = if (isBottomNav) 0 else navBar.bottom
v.setPadding(0, 0, 0, (16 * resources.displayMetrics.density).toInt() + extraBottom)
ViewCompat.setOnApplyWindowInsetsListener(binding.contentLayout) { v, insets ->
val bottomNav = activity?.findViewById<View>(R.id.bottomNavigation)
val navBarBottom = if (bottomNav?.visibility == View.VISIBLE) 0
else insets.getInsets(WindowInsetsCompat.Type.systemBars()).bottom
v.setPadding(0, 0, 0, (16 * resources.displayMetrics.density).toInt() + navBarBottom)
insets
}