summaryrefslogtreecommitdiffstats
path: root/core/res
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2010-10-05 14:30:51 -0700
committerChet Haase <chet@google.com>2010-10-05 15:13:24 -0700
commit9ff82bf2b33513052500473d0d6d025a80dcecbf (patch)
treecc13541088a776d0cda3e02f340de89279dc8d2b /core/res
parent10bc36522592179622a0fa7b7f6fffba5907fbf5 (diff)
downloadframeworks_base-9ff82bf2b33513052500473d0d6d025a80dcecbf.zip
frameworks_base-9ff82bf2b33513052500473d0d6d025a80dcecbf.tar.gz
frameworks_base-9ff82bf2b33513052500473d0d6d025a80dcecbf.tar.bz2
Adding next/prev to fragment animations and to PreferenceActivity
Adding a new concept of "next" and "previous" to fragment.s Previously, fragments would either be placed onto or taken off of the stack, or would just replace the current fragment. The new next/prev capability gives the ability to run a transition that is specific to next/previous operations, such as navigating forward and backward in a list. New next/prev animations may be associated with a fragment replace operation to get the next/prev animations built into the system (next animates things up, prev animates them down). Change-Id: Ia9f3663bac009376420d845b396ac51b8e4d1647
Diffstat (limited to 'core/res')
-rw-r--r--core/res/res/anim/fragment_close_enter.xml14
-rw-r--r--core/res/res/anim/fragment_close_exit.xml14
-rw-r--r--core/res/res/anim/fragment_next_enter.xml32
-rw-r--r--core/res/res/anim/fragment_next_exit.xml32
-rw-r--r--core/res/res/anim/fragment_open_enter.xml14
-rw-r--r--core/res/res/anim/fragment_open_exit.xml14
-rw-r--r--core/res/res/anim/fragment_prev_enter.xml32
-rw-r--r--core/res/res/anim/fragment_prev_exit.xml32
-rwxr-xr-xcore/res/res/values/attrs.xml4
-rw-r--r--core/res/res/values/public.xml4
-rw-r--r--core/res/res/values/styles.xml4
11 files changed, 140 insertions, 56 deletions
diff --git a/core/res/res/anim/fragment_close_enter.xml b/core/res/res/anim/fragment_close_enter.xml
index 53afa2a..7a9a3b9 100644
--- a/core/res/res/anim/fragment_close_enter.xml
+++ b/core/res/res/anim/fragment_close_enter.xml
@@ -19,20 +19,6 @@
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:interpolator="@anim/decelerate_interpolator"
- android:valueFrom="2"
- android:valueTo="1"
- android:valueType="floatType"
- android:propertyName="scaleX"
- android:duration="@android:integer/config_mediumAnimTime"/>
- <objectAnimator
- android:interpolator="@anim/decelerate_interpolator"
- android:valueFrom="2"
- android:valueTo="1"
- android:valueType="floatType"
- android:propertyName="scaleY"
- android:duration="@android:integer/config_mediumAnimTime"/>
- <objectAnimator
- android:interpolator="@anim/decelerate_interpolator"
android:valueFrom="0"
android:valueTo="1"
android:valueType="floatType"
diff --git a/core/res/res/anim/fragment_close_exit.xml b/core/res/res/anim/fragment_close_exit.xml
index 1554a4e..0743577 100644
--- a/core/res/res/anim/fragment_close_exit.xml
+++ b/core/res/res/anim/fragment_close_exit.xml
@@ -20,20 +20,6 @@
<objectAnimator
android:interpolator="@anim/accelerate_interpolator"
android:valueFrom="1"
- android:valueTo=".5"
- android:valueType="floatType"
- android:propertyName="scaleX"
- android:duration="@android:integer/config_mediumAnimTime"/>
- <objectAnimator
- android:interpolator="@anim/accelerate_interpolator"
- android:valueFrom="1"
- android:valueTo=".5"
- android:valueType="floatType"
- android:propertyName="scaleY"
- android:duration="@android:integer/config_mediumAnimTime"/>
- <objectAnimator
- android:interpolator="@anim/accelerate_interpolator"
- android:valueFrom="1"
android:valueTo="0"
android:valueType="floatType"
android:propertyName="alpha"
diff --git a/core/res/res/anim/fragment_next_enter.xml b/core/res/res/anim/fragment_next_enter.xml
new file mode 100644
index 0000000..d2d6ec9
--- /dev/null
+++ b/core/res/res/anim/fragment_next_enter.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <objectAnimator
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType"
+ android:propertyName="alpha"
+ android:duration="@android:integer/config_longAnimTime"/>
+ <objectAnimator
+ android:valueFrom="50"
+ android:valueTo="0"
+ android:valueType="floatType"
+ android:propertyName="translationY"
+ android:duration="@android:integer/config_longAnimTime"/>
+</set> \ No newline at end of file
diff --git a/core/res/res/anim/fragment_next_exit.xml b/core/res/res/anim/fragment_next_exit.xml
new file mode 100644
index 0000000..fbb82d9
--- /dev/null
+++ b/core/res/res/anim/fragment_next_exit.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <objectAnimator
+ android:valueFrom="1"
+ android:valueTo="0"
+ android:valueType="floatType"
+ android:propertyName="alpha"
+ android:duration="@android:integer/config_mediumAnimTime"/>
+ <objectAnimator
+ android:valueFrom="0"
+ android:valueTo="-50"
+ android:valueType="floatType"
+ android:propertyName="translationY"
+ android:duration="@android:integer/config_mediumAnimTime"/>
+</set> \ No newline at end of file
diff --git a/core/res/res/anim/fragment_open_enter.xml b/core/res/res/anim/fragment_open_enter.xml
index 142f60c..ac60494 100644
--- a/core/res/res/anim/fragment_open_enter.xml
+++ b/core/res/res/anim/fragment_open_enter.xml
@@ -18,20 +18,6 @@
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
- android:interpolator="@anim/decelerate_interpolator"
- android:valueFrom="2"
- android:valueTo="1"
- android:valueType="floatType"
- android:propertyName="scaleX"
- android:duration="@android:integer/config_mediumAnimTime"/>
- <objectAnimator
- android:interpolator="@anim/decelerate_interpolator"
- android:valueFrom="2"
- android:valueTo="1"
- android:valueType="floatType"
- android:propertyName="scaleY"
- android:duration="@android:integer/config_mediumAnimTime"/>
- <objectAnimator
android:valueFrom="0"
android:valueTo="1"
android:valueType="floatType"
diff --git a/core/res/res/anim/fragment_open_exit.xml b/core/res/res/anim/fragment_open_exit.xml
index 21260b9..3bf1ad4 100644
--- a/core/res/res/anim/fragment_open_exit.xml
+++ b/core/res/res/anim/fragment_open_exit.xml
@@ -18,20 +18,6 @@
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
- android:interpolator="@anim/accelerate_interpolator"
- android:valueFrom="1"
- android:valueTo="2"
- android:valueType="floatType"
- android:propertyName="scaleX"
- android:duration="@android:integer/config_mediumAnimTime"/>
- <objectAnimator
- android:interpolator="@anim/accelerate_interpolator"
- android:valueFrom="1"
- android:valueTo="2"
- android:valueType="floatType"
- android:propertyName="scaleY"
- android:duration="@android:integer/config_mediumAnimTime"/>
- <objectAnimator
android:valueFrom="1"
android:valueTo="0"
android:valueType="floatType"
diff --git a/core/res/res/anim/fragment_prev_enter.xml b/core/res/res/anim/fragment_prev_enter.xml
new file mode 100644
index 0000000..d37afd0
--- /dev/null
+++ b/core/res/res/anim/fragment_prev_enter.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <objectAnimator
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType"
+ android:propertyName="alpha"
+ android:duration="@android:integer/config_longAnimTime"/>
+ <objectAnimator
+ android:valueFrom="-50"
+ android:valueTo="0"
+ android:valueType="floatType"
+ android:propertyName="translationY"
+ android:duration="@android:integer/config_longAnimTime"/>
+</set> \ No newline at end of file
diff --git a/core/res/res/anim/fragment_prev_exit.xml b/core/res/res/anim/fragment_prev_exit.xml
new file mode 100644
index 0000000..a445a4d
--- /dev/null
+++ b/core/res/res/anim/fragment_prev_exit.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <objectAnimator
+ android:valueFrom="1"
+ android:valueTo="0"
+ android:valueType="floatType"
+ android:propertyName="alpha"
+ android:duration="@android:integer/config_mediumAnimTime"/>
+ <objectAnimator
+ android:valueFrom="0"
+ android:valueTo="50"
+ android:valueType="floatType"
+ android:propertyName="translationY"
+ android:duration="@android:integer/config_mediumAnimTime"/>
+</set> \ No newline at end of file
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 8e2b762..33d3eeb 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1088,6 +1088,10 @@
<attr name="fragmentOpenExitAnimation" format="reference" />
<attr name="fragmentCloseEnterAnimation" format="reference" />
<attr name="fragmentCloseExitAnimation" format="reference" />
+ <attr name="fragmentNextEnterAnimation" format="reference" />
+ <attr name="fragmentNextExitAnimation" format="reference" />
+ <attr name="fragmentPrevEnterAnimation" format="reference" />
+ <attr name="fragmentPrevExitAnimation" format="reference" />
</declare-styleable>
<!-- Window animation class attributes. -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 35f8df5..2c3c4fc 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1332,6 +1332,10 @@
<public type="attr" name="fragmentOpenExitAnimation" />
<public type="attr" name="fragmentCloseEnterAnimation" />
<public type="attr" name="fragmentCloseExitAnimation" />
+ <public type="attr" name="fragmentNextEnterAnimation" />
+ <public type="attr" name="fragmentNextExitAnimation" />
+ <public type="attr" name="fragmentPrevEnterAnimation" />
+ <public type="attr" name="fragmentPrevExitAnimation" />
<public type="attr" name="actionBarSize" />
<public type="attr" name="imeSubtypeLocale" />
<public type="attr" name="imeSubtypeMode" />
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 3dfaf7f..4b5047e 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -78,6 +78,10 @@
<item name="fragmentOpenExitAnimation">@anim/fragment_open_exit</item>
<item name="fragmentCloseEnterAnimation">@anim/fragment_close_enter</item>
<item name="fragmentCloseExitAnimation">@anim/fragment_close_exit</item>
+ <item name="fragmentNextEnterAnimation">@anim/fragment_next_enter</item>
+ <item name="fragmentNextExitAnimation">@anim/fragment_next_exit</item>
+ <item name="fragmentPrevEnterAnimation">@anim/fragment_prev_enter</item>
+ <item name="fragmentPrevExitAnimation">@anim/fragment_prev_exit</item>
</style>
<!-- Standard animations for a non-full-screen window or activity. -->