Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fde796bc authored by Michal Brzezinski's avatar Michal Brzezinski
Browse files

2/2 Making bouncer shift on double tap when user chooser is visible

This change adds nice animation when bouncer/security swap sides with user chooser view.

The main changes are:
- extracting security animation code to SidedSecurityMode superclass and adding listener to security alpha during animation so that user chooser view can synchronize its alpha along with it.
- user switcher mode doesn't use gravity anymore to position views horizontally, now it uses X translation, just like one handed mode

Bouncer animation doesn't change at all compared to one handed mode and user chooser: fades out when bouncer fades out, shifts to the destination position and then fades in when bouncer fades in.

Bug: 220872694
Test: KeyguardSecurityContainerTest + open bouncer with user chooser on the side, double tap on the other side of the bouncer, see views swap positions with nice animation
Change-Id: I6ed2d2a6006063f63a8f9edf6da47abbfb7efb45
parent fd8aa55e
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -102,12 +102,13 @@
         screen. -->
    <item name="half_opened_bouncer_height_ratio" type="dimen" format="float">0.0</item>

    <!-- The actual amount of translation that is applied to the bouncer when it animates from one
         side of the screen to the other in one-handed mode. Note that it will always translate from
         the side of the screen to the other (it will "jump" closer to the destination while the
         opacity is zero), but this controls how much motion will actually be applied to it while
         animating. Larger values will cause it to move "faster" while fading out/in. -->
    <dimen name="one_handed_bouncer_move_animation_translation">120dp</dimen>
    <!-- The actual amount of translation that is applied to the security when it animates from one
         side of the screen to the other in one-handed or user switcher mode. Note that it will
         always translate from the side of the screen to the other (it will "jump" closer to the
         destination while the opacity is zero), but this controls how much motion will actually be
         applied to it while animating. Larger values will cause it to move "faster" while
         fading out/in. -->
    <dimen name="security_shift_animation_translation">120dp</dimen>


    <dimen name="bouncer_user_switcher_header_text_size">20sp</dimen>
+185 −129

File changed.

Preview size limit exceeded, changes collapsed.

+47 −34

File changed.

Preview size limit exceeded, changes collapsed.