forked from mirrors/gecko-dev
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:
parent
5b6673f0bc
commit
49db4f278e
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue