|
|
@ -767,9 +767,11 @@ class ResultsBottomDrawer(private val context: Context) |
|
|
{ |
|
|
{ |
|
|
val deltaY = event.rawY - initialTouchY |
|
|
val deltaY = event.rawY - initialTouchY |
|
|
|
|
|
|
|
|
if (deltaY > SWIPE_THRESHOLD && isExpanded) |
|
|
if (deltaY > SWIPE_THRESHOLD) |
|
|
{ |
|
|
{ |
|
|
// Only collapse to minimal state if expanded, never fully dismiss |
|
|
if (isExpanded) |
|
|
|
|
|
{ |
|
|
|
|
|
// Collapse to minimal state if expanded |
|
|
collapseDrawer() |
|
|
collapseDrawer() |
|
|
ObjectAnimator.ofFloat(view, "translationY", view.translationY, initialTranslationY).apply { |
|
|
ObjectAnimator.ofFloat(view, "translationY", view.translationY, initialTranslationY).apply { |
|
|
duration = 200L |
|
|
duration = 200L |
|
|
@ -777,6 +779,12 @@ class ResultsBottomDrawer(private val context: Context) |
|
|
start() |
|
|
start() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
// Fully dismiss if collapsed and swiped down far enough |
|
|
|
|
|
hide() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
else if (deltaY < EXPAND_THRESHOLD && !isExpanded) |
|
|
else if (deltaY < EXPAND_THRESHOLD && !isExpanded) |
|
|
{ |
|
|
{ |
|
|
// Expand if swiped up enough |
|
|
// Expand if swiped up enough |
|
|
|