diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-11-05 10:49:49 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-11-05 10:50:58 -0700 |
commit | 8fe044a3a963c9bb654ea5ba7da80a3132c12cee (patch) | |
tree | 41103e3834acbdb5e354629dfb2d4116fe81ee8c /core/res | |
parent | 55ea91f217ae519e91c50081287a5cea1eed77f0 (diff) | |
download | frameworks_base-8fe044a3a963c9bb654ea5ba7da80a3132c12cee.zip frameworks_base-8fe044a3a963c9bb654ea5ba7da80a3132c12cee.tar.gz frameworks_base-8fe044a3a963c9bb654ea5ba7da80a3132c12cee.tar.bz2 |
Adjust window animations to better match UX spec.
This introduces new resources for interpolators that match the
types received from UX, and uses them appropriately in the animations.
Change-Id: I68c435ff1c8845c7854fa78f24e33157659b16d1
Diffstat (limited to 'core/res')
-rw-r--r-- | core/res/res/anim/accelerate_cubic_interpolator.xml | 22 | ||||
-rw-r--r-- | core/res/res/anim/accelerate_quint_interpolator.xml | 22 | ||||
-rw-r--r-- | core/res/res/anim/activity_close_enter.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/activity_close_exit.xml | 6 | ||||
-rw-r--r-- | core/res/res/anim/activity_open_enter.xml | 6 | ||||
-rw-r--r-- | core/res/res/anim/activity_open_exit.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/decelerate_cubic_interpolator.xml | 22 | ||||
-rw-r--r-- | core/res/res/anim/decelerate_quint_interpolator.xml | 22 | ||||
-rw-r--r-- | core/res/res/anim/wallpaper_close_enter.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/wallpaper_close_exit.xml | 5 | ||||
-rw-r--r-- | core/res/res/anim/wallpaper_open_enter.xml | 4 | ||||
-rw-r--r-- | core/res/res/anim/wallpaper_open_exit.xml | 4 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 11 |
13 files changed, 115 insertions, 21 deletions
diff --git a/core/res/res/anim/accelerate_cubic_interpolator.xml b/core/res/res/anim/accelerate_cubic_interpolator.xml new file mode 100644 index 0000000..c736766 --- /dev/null +++ b/core/res/res/anim/accelerate_cubic_interpolator.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/res/anim/ease_in_interpolator.xml +** +** Copyright 2010, 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. +*/ +--> + +<accelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" + android:factor="1.5" /> diff --git a/core/res/res/anim/accelerate_quint_interpolator.xml b/core/res/res/anim/accelerate_quint_interpolator.xml new file mode 100644 index 0000000..5ab4909 --- /dev/null +++ b/core/res/res/anim/accelerate_quint_interpolator.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/res/anim/ease_in_interpolator.xml +** +** Copyright 2010, 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. +*/ +--> + +<accelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" + android:factor="2.5" /> diff --git a/core/res/res/anim/activity_close_enter.xml b/core/res/res/anim/activity_close_enter.xml index 155ad00..0674284 100644 --- a/core/res/res/anim/activity_close_enter.xml +++ b/core/res/res/anim/activity_close_enter.xml @@ -17,10 +17,8 @@ */ --> -<set xmlns:android="http://schemas.android.com/apk/res/android" - android:interpolator="@anim/decelerate_interpolator"> +<set xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Do nothing. --> <alpha android:fromAlpha="1.0" android:toAlpha="1.0" - android:interpolator="@anim/decelerate_interpolator" android:duration="@android:integer/config_mediumAnimTime"/> </set> diff --git a/core/res/res/anim/activity_close_exit.xml b/core/res/res/anim/activity_close_exit.xml index 77684d9..5e29df4 100644 --- a/core/res/res/anim/activity_close_exit.xml +++ b/core/res/res/anim/activity_close_exit.xml @@ -17,13 +17,13 @@ */ --> -<set xmlns:android="http://schemas.android.com/apk/res/android" - android:interpolator="@anim/decelerate_interpolator"> +<set xmlns:android="http://schemas.android.com/apk/res/android"> <scale android:fromXScale="1.0" android:toXScale="1.0" android:fromYScale="1.0" android:toYScale="0.9" android:pivotX="50%p" android:pivotY="50%p" + android:interpolator="@anim/decelerate_quint_interpolator" android:duration="@android:integer/config_mediumAnimTime" /> <alpha android:fromAlpha="1.0" android:toAlpha="0" - android:interpolator="@anim/decelerate_interpolator" + android:interpolator="@anim/decelerate_cubic_interpolator" android:duration="@android:integer/config_mediumAnimTime"/> </set> diff --git a/core/res/res/anim/activity_open_enter.xml b/core/res/res/anim/activity_open_enter.xml index d4140ef..63cc9a5 100644 --- a/core/res/res/anim/activity_open_enter.xml +++ b/core/res/res/anim/activity_open_enter.xml @@ -17,13 +17,13 @@ */ --> -<set xmlns:android="http://schemas.android.com/apk/res/android" - android:interpolator="@anim/decelerate_interpolator"> +<set xmlns:android="http://schemas.android.com/apk/res/android"> <scale android:fromXScale="1.0" android:toXScale="1.0" android:fromYScale="0.9" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" + android:interpolator="@anim/decelerate_quint_interpolator" android:duration="@android:integer/config_mediumAnimTime" /> <alpha android:fromAlpha="0" android:toAlpha="1.0" - android:interpolator="@anim/accelerate_decelerate_interpolator" + android:interpolator="@anim/decelerate_cubic_interpolator" android:duration="@android:integer/config_mediumAnimTime"/> </set> diff --git a/core/res/res/anim/activity_open_exit.xml b/core/res/res/anim/activity_open_exit.xml index 155ad00..0674284 100644 --- a/core/res/res/anim/activity_open_exit.xml +++ b/core/res/res/anim/activity_open_exit.xml @@ -17,10 +17,8 @@ */ --> -<set xmlns:android="http://schemas.android.com/apk/res/android" - android:interpolator="@anim/decelerate_interpolator"> +<set xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Do nothing. --> <alpha android:fromAlpha="1.0" android:toAlpha="1.0" - android:interpolator="@anim/decelerate_interpolator" android:duration="@android:integer/config_mediumAnimTime"/> </set> diff --git a/core/res/res/anim/decelerate_cubic_interpolator.xml b/core/res/res/anim/decelerate_cubic_interpolator.xml new file mode 100644 index 0000000..78bdb40 --- /dev/null +++ b/core/res/res/anim/decelerate_cubic_interpolator.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/res/anim/ease_in_interpolator.xml +** +** Copyright 2010, 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. +*/ +--> + +<decelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" + android:factor="1.5" /> diff --git a/core/res/res/anim/decelerate_quint_interpolator.xml b/core/res/res/anim/decelerate_quint_interpolator.xml new file mode 100644 index 0000000..0e543e6 --- /dev/null +++ b/core/res/res/anim/decelerate_quint_interpolator.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/res/anim/ease_in_interpolator.xml +** +** Copyright 2010, 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. +*/ +--> + +<decelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" + android:factor="2.5" /> diff --git a/core/res/res/anim/wallpaper_close_enter.xml b/core/res/res/anim/wallpaper_close_enter.xml index ba50d69..38eac97 100644 --- a/core/res/res/anim/wallpaper_close_enter.xml +++ b/core/res/res/anim/wallpaper_close_enter.xml @@ -24,12 +24,12 @@ android:fromYScale=".9" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" android:fillEnabled="true" android:fillBefore="true" - android:interpolator="@anim/decelerate_interpolator" + android:interpolator="@anim/decelerate_quint_interpolator" android:startOffset="@android:integer/config_mediumAnimTime" android:duration="@android:integer/config_mediumAnimTime" /> <alpha android:fromAlpha="0" android:toAlpha="1.0" android:fillEnabled="true" android:fillBefore="true" - android:interpolator="@anim/decelerate_interpolator" + android:interpolator="@anim/decelerate_quint_interpolator" android:startOffset="@android:integer/config_mediumAnimTime" android:duration="@android:integer/config_mediumAnimTime"/> </set> diff --git a/core/res/res/anim/wallpaper_close_exit.xml b/core/res/res/anim/wallpaper_close_exit.xml index 5af1d11..f8805a2 100644 --- a/core/res/res/anim/wallpaper_close_exit.xml +++ b/core/res/res/anim/wallpaper_close_exit.xml @@ -24,16 +24,15 @@ android:fromYScale="1.0" android:toYScale="0.8" android:pivotX="50%p" android:pivotY="50%p" android:fillEnabled="true" android:fillAfter="true" - android:interpolator="@anim/decelerate_interpolator" + android:interpolator="@anim/decelerate_quint_interpolator" android:duration="@android:integer/config_mediumAnimTime" /> <alpha android:fromAlpha="1.0" android:toAlpha="0" android:fillEnabled="true" android:fillAfter="true" - android:interpolator="@anim/decelerate_interpolator" + android:interpolator="@anim/decelerate_cubic_interpolator" android:duration="@android:integer/config_mediumAnimTime"/> <!-- This is just to keep the animation running for the entire duration. --> <alpha android:fromAlpha="1.0" android:toAlpha="1.0" android:startOffset="@android:integer/config_mediumAnimTime" - android:interpolator="@anim/decelerate_interpolator" android:duration="@android:integer/config_mediumAnimTime"/> </set> diff --git a/core/res/res/anim/wallpaper_open_enter.xml b/core/res/res/anim/wallpaper_open_enter.xml index 879d84a..f150900 100644 --- a/core/res/res/anim/wallpaper_open_enter.xml +++ b/core/res/res/anim/wallpaper_open_enter.xml @@ -19,15 +19,15 @@ <!-- New holo animation, zooming contents on top of wallpaper back up. --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:interpolator="@anim/decelerate_interpolator" android:detachWallpaper="true"> <scale android:fromXScale="0.8" android:toXScale="1.0" android:fromYScale="0.8" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" + android:interpolator="@anim/decelerate_quint_interpolator" android:startOffset="@android:integer/config_mediumAnimTime" android:duration="@android:integer/config_mediumAnimTime" /> <alpha android:fromAlpha="0" android:toAlpha="1.0" - android:interpolator="@anim/accelerate_decelerate_interpolator" + android:interpolator="@anim/decelerate_cubic_interpolator" android:startOffset="@android:integer/config_mediumAnimTime" android:duration="@android:integer/config_mediumAnimTime"/> </set> diff --git a/core/res/res/anim/wallpaper_open_exit.xml b/core/res/res/anim/wallpaper_open_exit.xml index 89fff82..c9d5310 100644 --- a/core/res/res/anim/wallpaper_open_exit.xml +++ b/core/res/res/anim/wallpaper_open_exit.xml @@ -23,10 +23,10 @@ <scale android:fromXScale="1.0" android:toXScale="1.0" android:fromYScale="1.0" android:toYScale=".9" android:pivotX="50%p" android:pivotY="50%p" - android:interpolator="@anim/decelerate_interpolator" + android:interpolator="@anim/decelerate_quint_interpolator" android:duration="@android:integer/config_mediumAnimTime" /> <alpha android:fromAlpha="1.0" android:toAlpha="0" - android:interpolator="@anim/accelerate_decelerate_interpolator" + android:interpolator="@anim/decelerate_quint_interpolator" android:duration="@android:integer/config_mediumAnimTime"/> </set> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index f8752d3..8772b3a 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -925,7 +925,9 @@ <public type="anim" name="slide_in_left" id="0x010a0002" /> <public type="anim" name="slide_out_right" id="0x010a0003" /> <public type="anim" name="accelerate_decelerate_interpolator" id="0x010a0004" /> + <!-- Acceleration curve matching Flash's quadratic ease out function. --> <public type="anim" name="accelerate_interpolator" id="0x010a0005" /> + <!-- Acceleration curve matching Flash's quadratic ease in function. --> <public type="anim" name="decelerate_interpolator" id="0x010a0006" /> <!-- =============================================================== @@ -1364,6 +1366,15 @@ <public type="anim" name="animator_fade_in" /> <public type="anim" name="animator_fade_out" /> + <!-- Acceleration curve matching Flash's cubic ease out function. --> + <public type="anim" name="accelerate_cubic_interpolator" /> + <!-- Acceleration curve matching Flash's cubic ease in function. --> + <public type="anim" name="decelerate_cubic_interpolator" /> + <!-- Acceleration curve matching Flash's quint ease out function. --> + <public type="anim" name="accelerate_quint_interpolator" /> + <!-- Acceleration curve matching Flash's quint ease in function. --> + <public type="anim" name="decelerate_quint_interpolator" /> + <public type="id" name="home" /> <!-- Context menu ID for the "Select text..." menu item to switch to text selection context mode in text views. --> |