Merge pull request #72 from miDeb/top_tabtray_animation

Fix top tab tray entry/exit animations
pull/76/head
interfect 4 years ago committed by GitHub
commit d3b6d7b77a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -169,6 +169,10 @@ class TabTrayDialogFragment : AppCompatDialogFragment(), UserInteractionHandler
val activity = activity as HomeActivity
val isPrivate = activity.browsingModeManager.mode.isPrivate
if (requireContext().settings().useTopTabsTray) {
dialog?.window?.attributes?.windowAnimations = R.style.TopTabTrayAnimation
}
val thumbnailLoader = ThumbnailLoader(requireContext().components.core.thumbnailStorage)
val adapter = FenixTabsAdapter(requireContext(), thumbnailLoader)
currentOrientation = resources.configuration.orientation

@ -0,0 +1,14 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:interpolator="@android:interpolator/decelerate_quad"
android:fromAlpha="0" android:toAlpha="1"
android:duration="150" />
<translate
android:interpolator="@android:interpolator/decelerate_quad"
android:fromYDelta="-7%" android:toYDelta="0%"
android:duration="150"/>
</set>

@ -0,0 +1,14 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:interpolator="@android:interpolator/accelerate_quad"
android:fromAlpha="1" android:toAlpha="0"
android:duration="125" />
<translate
android:interpolator="@android:interpolator/accelerate_quad"
android:fromYDelta="0%" android:toYDelta="-7%"
android:duration="125"/>
</set>

@ -274,6 +274,11 @@
<item name="android:windowExitAnimation">@anim/fade_out</item>
</style>
<style name="TopTabTrayAnimation">
<item name="android:windowEnterAnimation">@anim/fade_in_down</item>
<item name="android:windowExitAnimation">@anim/fade_out_up</item>
</style>
<!-- UI button styling -->
<style name="NeutralButton" parent="Widget.MaterialComponents.Button.TextButton">
<item name="iconTint">@color/button_text_color</item>

Loading…
Cancel
Save