Loading core/java/android/util/MathUtils.java +4 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,10 @@ public final class MathUtils { return start + (stop - start) * amount; } public static float lerp(int start, int stop, float amount) { return lerp((float) start, (float) stop, amount); } /** * Returns the interpolation scalar (s) that satisfies the equation: {@code value = }{@link * #lerp}{@code (a, b, s)} Loading packages/SystemUI/animation/res/anim/launch_host_dialog_enter.xml 0 → 100644 +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 packages/SystemUI/animation/res/anim/launch_host_dialog_exit.xml 0 → 100644 +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 packages/SystemUI/animation/res/values/ids.xml 0 → 100644 +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 packages/SystemUI/animation/res/values/styles.xml 0 → 100644 +29 −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="HostDialogTheme"> <item name="android:windowAnimationStyle">@style/Animation.HostDialog</item> <item name="android:windowIsFloating">false</item> <item name="android:backgroundDimEnabled">true</item> <item name="android:navigationBarColor">@android:color/transparent</item> </style> <style name="Animation.HostDialog" 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 Loading
core/java/android/util/MathUtils.java +4 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,10 @@ public final class MathUtils { return start + (stop - start) * amount; } public static float lerp(int start, int stop, float amount) { return lerp((float) start, (float) stop, amount); } /** * Returns the interpolation scalar (s) that satisfies the equation: {@code value = }{@link * #lerp}{@code (a, b, s)} Loading
packages/SystemUI/animation/res/anim/launch_host_dialog_enter.xml 0 → 100644 +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
packages/SystemUI/animation/res/anim/launch_host_dialog_exit.xml 0 → 100644 +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
packages/SystemUI/animation/res/values/ids.xml 0 → 100644 +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
packages/SystemUI/animation/res/values/styles.xml 0 → 100644 +29 −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="HostDialogTheme"> <item name="android:windowAnimationStyle">@style/Animation.HostDialog</item> <item name="android:windowIsFloating">false</item> <item name="android:backgroundDimEnabled">true</item> <item name="android:navigationBarColor">@android:color/transparent</item> </style> <style name="Animation.HostDialog" 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