summaryrefslogtreecommitdiffstats
path: root/tests/TransitionTests/src/com/android/transitiontests/ClippingText.java
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2013-09-20 16:33:08 -0700
committerChet Haase <chet@google.com>2013-09-26 13:38:12 -0700
commitb7a7fc9d233bad507ce893882352618b13647058 (patch)
tree852dc972097c9064c161b44676823949427e1206 /tests/TransitionTests/src/com/android/transitiontests/ClippingText.java
parentc31f118825778cff15a1c1b9d1171f2ad178a013 (diff)
downloadframeworks_base-b7a7fc9d233bad507ce893882352618b13647058.zip
frameworks_base-b7a7fc9d233bad507ce893882352618b13647058.tar.gz
frameworks_base-b7a7fc9d233bad507ce893882352618b13647058.tar.bz2
Make fading transitions work better
Previously, a Fade transition would only affect a view if its parent hierarchy was not also affected between the start/end states. This caused problems for views which were removed from their parents between scenes when their parents' visibility also changed between those scenes. The effect would be that the transition would fade the parent... but the child would no longer be in that parent, so the user would just see the child view blink out. This fix ensure that views are faded appropriately by fading them regardless the parent hierarchy; if a view is removed from its parent, fade it out. Additionally, if that view has not been removed from its parent, but its parent is no longer parented *and* scene being transitioned from is based on a layout resource file (and thus the views are considered temporary after transitioning), then it is removed from its parent to be faded out in the overlay. Also, renamed TextChange to ChangeText to be more consistent with other transition class names. Change-Id: I4e0e7dfc9e9d95c7a4ca586534b6d204c4f3bae0
Diffstat (limited to 'tests/TransitionTests/src/com/android/transitiontests/ClippingText.java')
-rw-r--r--tests/TransitionTests/src/com/android/transitiontests/ClippingText.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/TransitionTests/src/com/android/transitiontests/ClippingText.java b/tests/TransitionTests/src/com/android/transitiontests/ClippingText.java
index 85702fa..54c44e2 100644
--- a/tests/TransitionTests/src/com/android/transitiontests/ClippingText.java
+++ b/tests/TransitionTests/src/com/android/transitiontests/ClippingText.java
@@ -23,7 +23,7 @@ import android.view.ViewGroup;
import android.transition.Scene;
import android.widget.Button;
import android.transition.Fade;
-import android.transition.TextChange;
+import android.transition.ChangeText;
import android.transition.TransitionSet;
import android.transition.TransitionManager;
@@ -51,7 +51,7 @@ public class ClippingText extends Activity {
mChanger = new TransitionSet().setOrdering(TransitionSet.ORDERING_TOGETHER);
ChangeBounds changeBounds = new ChangeBounds();
changeBounds.setResizeClip(true);
- mChanger.addTransition(changeBounds).addTransition(new TextChange());
+ mChanger.addTransition(changeBounds).addTransition(new ChangeText());
mCurrentScene = mScene1;
}