summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mike Digman <digman@google.com> 2019-05-01 15:48:36 -0700
committer Mike Digman <digman@google.com> 2019-05-03 17:44:56 +0000
commita8d026e5f1e56eec30358a56e11b79cd9ac034ce (patch)
treee2fe3c0c697ebc8d4131a81d40f988cefe09b34d
parent34d1b5f4f0995b68113c0478d107a282935f8a01 (diff)
Sharesheet - alter entrance animation
And delay and slow down entrance animation to give more leeway for icons to load. Simplest approach is to use styles. In the future may be needed to pull into Chooser/Resolver. Fixes: 131753649 Test: visual Change-Id: I60de95d98b1ba6adadabe4198dc7edc15f9c248b
-rw-r--r--core/res/res/anim/resolver_close_anim.xml28
-rw-r--r--core/res/res/anim/resolver_launch_anim.xml27
-rw-r--r--core/res/res/values/symbols.xml4
-rw-r--r--core/res/res/values/themes_device_defaults.xml11
4 files changed, 67 insertions, 3 deletions
diff --git a/core/res/res/anim/resolver_close_anim.xml b/core/res/res/anim/resolver_close_anim.xml
new file mode 100644
index 000000000000..18a25e985943
--- /dev/null
+++ b/core/res/res/anim/resolver_close_anim.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, 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.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@anim/accelerate_interpolator"
+ android:zAdjustment="top">
+
+ <translate xmlns:android="http://schemas.android.com/apk/res/android"
+ android:fromYDelta="0"
+ android:toYDelta="100%"
+ android:duration="@android:integer/config_shortAnimTime" />
+</set>
diff --git a/core/res/res/anim/resolver_launch_anim.xml b/core/res/res/anim/resolver_launch_anim.xml
new file mode 100644
index 000000000000..ebb3701316fa
--- /dev/null
+++ b/core/res/res/anim/resolver_launch_anim.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2019 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
+ -->
+
+<!-- Animation for when a dock window at the bottom of the screen is entering. -->
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@anim/accelerate_decelerate_interpolator"
+ android:zAdjustment="top">
+
+ <translate android:fromYDelta="100%"
+ android:toYDelta="0"
+ android:startOffset="@android:integer/config_shortAnimTime"
+ android:duration="@android:integer/config_mediumAnimTime"/>
+</set> \ No newline at end of file
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index d178383973fd..aa3ddc284329 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -3785,6 +3785,8 @@
<java-symbol type="dimen" name="chooser_direct_share_label_placeholder_max_width" />
<java-symbol type="layout" name="chooser_az_label_row" />
<java-symbol type="string" name="chooser_all_apps_button_label" />
-
+ <java-symbol type="anim" name="resolver_launch_anim" />
+ <java-symbol type="style" name="Animation.DeviceDefault.Activity.Resolver" />
+
<java-symbol type="string" name="config_defaultSupervisionProfileOwnerComponent" />
</resources>
diff --git a/core/res/res/values/themes_device_defaults.xml b/core/res/res/values/themes_device_defaults.xml
index 2e984601524d..b257815a3761 100644
--- a/core/res/res/values/themes_device_defaults.xml
+++ b/core/res/res/values/themes_device_defaults.xml
@@ -1665,8 +1665,7 @@ easier.
<!-- Theme used for the intent picker activity. -->
<style name="Theme.DeviceDefault.ResolverCommon" parent="Theme.DeviceDefault.DayNight">
- <item name="windowEnterTransition">@empty</item>
- <item name="windowExitTransition">@empty</item>
+ <item name="windowAnimationStyle">@style/Animation.DeviceDefault.Activity.Resolver</item>
<item name="windowIsTranslucent">true</item>
<item name="windowNoTitle">true</item>
<item name="windowBackground">@color/transparent</item>
@@ -1680,6 +1679,14 @@ easier.
<item name="navigationBarDividerColor">@color/chooser_row_divider</item>
</style>
+ <style name="Animation.DeviceDefault.Activity.Resolver" parent="Animation.DeviceDefault.Activity">
+ <item name="activityOpenEnterAnimation">@anim/resolver_launch_anim</item>
+ <item name="taskOpenEnterAnimation">@anim/resolver_launch_anim</item>
+ <!-- Handle close for profile switching -->
+ <item name="activityOpenExitAnimation">@anim/resolver_close_anim</item>
+ <item name="taskOpenExitAnimation">@anim/resolver_close_anim</item>
+ </style>
+
<style name="Theme.DeviceDefault.Resolver" parent="Theme.DeviceDefault.ResolverCommon">
<item name="windowLightNavigationBar">true</item>
</style>