Fix status bar padding on None

This commit is contained in:
Blatzar 2022-10-28 21:43:56 +02:00
parent 9ee0653ecf
commit 617fc4a295
2 changed files with 8 additions and 1 deletions

View file

@ -545,6 +545,8 @@ class HomeFragment : Fragment() {
when (preview) { when (preview) {
is Resource.Success -> { is Resource.Success -> {
home_preview?.isVisible = true home_preview?.isVisible = true
home_watch_holder?.setPadding(0,0,0,0)
preview.value.apply { preview.value.apply {
home_preview_tags?.text = tags?.joinToString("") ?: "" home_preview_tags?.text = tags?.joinToString("") ?: ""
home_preview_tags?.isGone = tags.isNullOrEmpty() home_preview_tags?.isGone = tags.isNullOrEmpty()
@ -592,6 +594,7 @@ class HomeFragment : Fragment() {
} }
else -> { else -> {
home_preview?.isVisible = false home_preview?.isVisible = false
context?.fixPaddingStatusbar(home_watch_holder)
} }
} }
} }

View file

@ -434,7 +434,11 @@
</LinearLayout> </LinearLayout>
</FrameLayout> </FrameLayout>
<!--
All padding in home_watch_holder is determined in runtime
This is because the home poster can be invisible which forces
us to take the status bar space into account
-->
<LinearLayout <LinearLayout
android:id="@+id/home_watch_holder" android:id="@+id/home_watch_holder"
android:layout_width="match_parent" android:layout_width="match_parent"