diff options
author | Chet Haase <chet@google.com> | 2013-06-21 15:00:05 -0700 |
---|---|---|
committer | Chet Haase <chet@google.com> | 2013-06-21 16:07:14 -0700 |
commit | 2ea7f8b9c5f903050d42c1af57406bf528979f45 (patch) | |
tree | 80f0c3fcb68c1842f28906a306e3b41468b2fef0 /tests/TransitionTests/res | |
parent | 862a301bf9fd3d315948872873602ba7bcb043d4 (diff) | |
download | frameworks_base-2ea7f8b9c5f903050d42c1af57406bf528979f45.zip frameworks_base-2ea7f8b9c5f903050d42c1af57406bf528979f45.tar.gz frameworks_base-2ea7f8b9c5f903050d42c1af57406bf528979f45.tar.bz2 |
Refactoring/simplifying Transition code/API
Transitions used to be three phase:
- captureValues(): get all relevant property values in the
affected view targets
- setup(): set appropriate start values for affected views
prior to any transitions being played
- play(): create/play Animators for affected views
Now the second and third phases have been collapsed (and named
"play()"). This single step sets initial values for target views
and creates any Animators that should be played during the transition.
The transition mechanism stores these Animators and then starts
them at the appropriate time in the overall transition.
Issue #9507585 Transitions: Simplify Transition.play() design
Change-Id: I3fc67599b38fe49eee885dc5d32444db90b7703b
Diffstat (limited to 'tests/TransitionTests/res')
-rw-r--r-- | tests/TransitionTests/res/layout/hierarchical_move.xml | 46 | ||||
-rw-r--r-- | tests/TransitionTests/res/values/strings.xml | 6 |
2 files changed, 52 insertions, 0 deletions
diff --git a/tests/TransitionTests/res/layout/hierarchical_move.xml b/tests/TransitionTests/res/layout/hierarchical_move.xml new file mode 100644 index 0000000..1e70ba9 --- /dev/null +++ b/tests/TransitionTests/res/layout/hierarchical_move.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:id="@+id/container" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/submit" + android:onClick="sendMessage" + android:id="@+id/sceneSwitchButton"/> + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/button0" + android:id="@+id/button0"/> + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/button1" + android:id="@+id/button1"/> + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/button2" + android:id="@+id/button2"/> + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/button3" + android:id="@+id/button3"/> + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/button4" + android:id="@+id/button4"/> + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/button5" + android:id="@+id/button5"/> + +</LinearLayout>
\ No newline at end of file diff --git a/tests/TransitionTests/res/values/strings.xml b/tests/TransitionTests/res/values/strings.xml index 3be243b..9b80a26 100644 --- a/tests/TransitionTests/res/values/strings.xml +++ b/tests/TransitionTests/res/values/strings.xml @@ -43,4 +43,10 @@ <string name="state2">State 2</string> <string name="state3">State 3</string> <string name="state4">State 4</string> + <string name="button0">Button 0</string> + <string name="button1">Button 1</string> + <string name="button2">Button 2</string> + <string name="button3">Button 3</string> + <string name="button4">Button 4</string> + <string name="button5">Button 5</string> </resources> |