From cfd8e6e8e863cae072e9864c9f7cc06e1c702d4f Mon Sep 17 00:00:00 2001 From: Tobias Zwick Date: Thu, 14 May 2020 23:04:06 +0200 Subject: [PATCH] fix X button on bottom sheet was not shown anymore --- .../streetcomplete/quests/AbstractBottomSheetFragment.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractBottomSheetFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractBottomSheetFragment.kt index 2774e0ec21..f0c4953d5e 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractBottomSheetFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractBottomSheetFragment.kt @@ -161,8 +161,7 @@ abstract class AbstractBottomSheetFragment : Fragment(), IsCloseableBottomSheet private fun updateCloseButtonVisibility() { // this is called asynchronously. It may happen that the activity is already gone when this // method is finally called - val speechBubbleTopMargin = resources.getDimension(R.dimen.quest_form_speech_bubble_top_margin) - val coversToolbar = bottomSheet.top < speechBubbleTopMargin + val coversToolbar = bottomSheet.top <= 0 closeButton.visibility = if (coversToolbar) View.VISIBLE else View.INVISIBLE }