diff options
| author | George Mount <mount@google.com> | 2014-06-19 07:51:08 -0700 |
|---|---|---|
| committer | George Mount <mount@google.com> | 2014-06-30 19:25:04 +0000 |
| commit | ecd857be3946283ebb4306e2c03ae70f5c5bb152 (patch) | |
| tree | a755ce8d5752c791015a68e466e1c8352919bfce /core/java/android/transition/Fade.java | |
| parent | 32292eb87bd48cee13a2f65204ad814fcfce305e (diff) | |
Add curved motion to Transitions.
Bug 15197527
Added two public PathMotions: PatternMotion and ArcMotion.
ArcMotion is the algorithm provided by UX. PatternMotion
provides a mechanism for using a Path as a pattern.
Change-Id: Ie57fd5f4e62269acc1164eced39853a12c52bd77
Diffstat (limited to 'core/java/android/transition/Fade.java')
| -rw-r--r-- | core/java/android/transition/Fade.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/transition/Fade.java b/core/java/android/transition/Fade.java index 71559dab076f..420c2488d069 100644 --- a/core/java/android/transition/Fade.java +++ b/core/java/android/transition/Fade.java @@ -16,9 +16,14 @@ package android.transition; +import com.android.internal.R; + import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; +import android.content.Context; +import android.content.res.TypedArray; +import android.util.AttributeSet; import android.util.Log; import android.view.View; import android.view.ViewGroup; @@ -93,6 +98,13 @@ public class Fade extends Visibility { setMode(fadingMode); } + public Fade(Context context, AttributeSet attrs) { + super(context, attrs); + TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.Fade); + int fadingMode = a.getInt(R.styleable.Fade_fadingMode, getMode()); + setMode(fadingMode); + } + /** * Utility method to handle creating and running the Animator. */ |
