-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP]Add navigational transition #407
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
public FadeOutTransition(Context context, AttributeSet attrs) { | ||
super(context, attrs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Call requires API level 21 (current min is 19): new android.transition.Transition [NewApi]
@Override | ||
public Animator createAnimator(ViewGroup sceneRoot, TransitionValues startValues, | ||
TransitionValues endValues) { | ||
return ObjectAnimator.ofFloat(endValues.view, View.TRANSLATION_Z, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Field requires API level 21 (current min is 16): android.view.View#TRANSLATION_Z [NewApi]
* (https://www.google.com/design/spec/patterns/navigational-transitions.html#navigational-transitions-parent-to-child) | ||
* when combined with a {@link android.transition.ChangeBounds} on a shared element. | ||
*/ | ||
public class LiftOff extends Transition { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Class requires API level 19 (current min is 16): android.transition.Transition [NewApi]
@@ -8,6 +8,8 @@ | |||
android:id="@+id/content_view" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/white" | |||
android:transitionName="@string/session_detail" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Warning: Attribute transitionName is only used in API level 21 and higher (current min is 16) [UnusedAttribute]
private final float finalElevation; | ||
|
||
public LiftOff(Context context, AttributeSet attrs) { | ||
super(context, attrs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Call requires API level 21 (current min is 16): new android.transition.Transition [NewApi]
} | ||
|
||
public FadeInTransition(Context context, AttributeSet attrs) { | ||
super(context, attrs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Call requires API level 21 (current min is 19): new android.transition.Transition [NewApi]
|
||
@Override | ||
public void captureEndValues(TransitionValues transitionValues) { | ||
transitionValues.values.put(PROPNAME_ELEVATION, finalElevation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Field requires API level 19 (current min is 16): android.transition.TransitionValues#values [NewApi]
@Override | ||
public void setMaximumAngle(float angleInDegrees) { | ||
mMaximumAngle = angleInDegrees; | ||
mMaximumTangent = toTangent(angleInDegrees); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Call requires API level 21 (current min is 16): android.transition.ArcMotion#toTangent [NewApi]
@@ -48,6 +54,37 @@ protected void onCreate(Bundle savedInstanceState) { | |||
} | |||
} | |||
replaceFragment(SessionDetailFragmentCreator.newBuilder(sessionId).build(), R.id.content_view); | |||
|
|||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |||
getWindow().getSharedElementEnterTransition().addListener(new Transition.TransitionListener() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Class requires API level 19 (current min is 16): android.transition.Transition.TransitionListener [NewApi]
@Override | ||
public Animator createAnimator(ViewGroup sceneRoot, TransitionValues startValues, | ||
TransitionValues endValues) { | ||
return ObjectAnimator.ofFloat(endValues.view, View.TRANSLATION_Z, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Field requires API level 19 (current min is 16): android.transition.TransitionValues#view [NewApi]
} | ||
|
||
public GravityArcMotion(Context context, AttributeSet attrs) { | ||
super(context, attrs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Call requires API level 21 (current min is 16): new android.transition.ArcMotion [NewApi]
|
||
@Override | ||
public void captureStartValues(TransitionValues transitionValues) { | ||
transitionValues.values.put(PROPNAME_ELEVATION, initialElevation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Field requires API level 19 (current min is 16): android.transition.TransitionValues#values [NewApi]
@Override | ||
public void setMinimumHorizontalAngle(float angleInDegrees) { | ||
mMinimumHorizontalAngle = angleInDegrees; | ||
mMinimumHorizontalTangent = toTangent(angleInDegrees); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Call requires API level 21 (current min is 16): android.transition.ArcMotion#toTangent [NewApi]
* <p> | ||
* See https://www.google.com/design/spec/motion/movement.html#movement-movement-within-screen-bounds | ||
*/ | ||
public class GravityArcMotion extends ArcMotion { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Class requires API level 21 (current min is 16): android.transition.ArcMotion [NewApi]
@Override | ||
public void setMinimumVerticalAngle(float angleInDegrees) { | ||
mMinimumVerticalAngle = angleInDegrees; | ||
mMinimumVerticalTangent = toTangent(angleInDegrees); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Android Lint] reported by reviewdog 🐶
Error: Call requires API level 21 (current min is 16): android.transition.ArcMotion#toTangent [NewApi]
Cool 🆒 |
Thanks! |
Overview (Required)
Links
Screenshot