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

Commit e5b54057 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Introduce DialogLaunchAnimator (1/2)

This CL introduces the DialogLaunchAnimator that allows to animate the
entry/exit of any Dialog from/to any View.

Note that this CL does not use the animator for any dialog yet, that
will be added in a follow-up CL.

Test: atest DialogLaunchAnimatorTest
Bug: 193634619
Change-Id: I87f71f8f127eb6c8f2ff7dc6a434b207d9ad4d11
parent c0a85b7c
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2021 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<!-- The enter animation of the host dialog is a translation of 0px that lasts 500ms so that the -->
<!-- host dialog is directly visible but the dim background still takes 500ms to fade in. -->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
  android:fromXDelta="0"
  android:toXDelta="0"
  android:duration="500" />
 No newline at end of file
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2021 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<alpha
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:interpolator/decelerate_cubic"
    android:duration="150"
    android:fromAlpha="1.0"
    android:toAlpha="0.0" />
 No newline at end of file
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2021 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<resources>
    <item type="id" name="launch_animation_running"/>
</resources>
 No newline at end of file
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2021 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<resources>
  <style name="Animation.LaunchHostDialog" parent="@android:style/Animation">
    <item name="android:windowEnterAnimation">@anim/launch_host_dialog_enter</item>
    <item name="android:windowExitAnimation">@anim/launch_host_dialog_exit</item>
  </style>
</resources>
 No newline at end of file
+523 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading