Bug 1891747 - Make Pull To Dismiss Smoother on Android Translations r=android-reviewers,giorga

This patch increases the friction coefficient for pull to dismiss.

Differential Revision: https://phabricator.services.mozilla.com/D207612
This commit is contained in:
ohall-m 2024-04-30 13:25:16 +00:00
parent 5b6673f0bc
commit 49db4f278e

View file

@ -48,6 +48,9 @@ import org.mozilla.fenix.translations.preferences.downloadlanguages.DownloadLang
import org.mozilla.fenix.translations.preferences.downloadlanguages.DownloadLanguageFileDialogType
import org.mozilla.fenix.translations.preferences.downloadlanguages.DownloadLanguagesFeature
// Friction should be increased, since peek height on this dialog is to fill the screen.
private const val DIALOG_FRICTION = .65f
/**
* The enum is to know what bottom sheet to open.
*/
@ -78,6 +81,7 @@ class TranslationsDialogFragment : BottomSheetDialogFragment() {
behavior = BottomSheetBehavior.from(bottomSheet)
behavior?.peekHeight = resources.displayMetrics.heightPixels
behavior?.state = BottomSheetBehavior.STATE_EXPANDED
behavior?.hideFriction = DIALOG_FRICTION
}
}