Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

takahirom
Copy link
Member

@takahirom takahirom commented Mar 7, 2017

Overview (Required)

  • This pull request is not require on DroidKaigi 2017/3/9
  • This pull request is just suggestion.
  • Add navigational transition
  • Currently require code clean up
  • Currently not compatible for pre lollipop
  • Currently not add license
  • Currently not stable(Multiple time starting activity occur clash )
FATAL EXCEP

TION: main
Process: io.github.droidkaigi.confsched2017.develop.debug, PID: 14175
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.ViewGroup.transformMatrixToGlobal(android.graphics.Matrix)' on a null object reference
    at android.view.GhostView.calculateMatrix(GhostView.java:89)
    at android.app.ActivityTransitionCoordinator$GhostViewListeners.onPreDraw(ActivityTransitionCoordinator.java:1000)
    at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2205)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
    at android.view.Choreographer.doCallbacks(Choreographer.java:686)
    at android.view.Choreographer.doFrame(Choreographer.java:621)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6119)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
  • If I resolve problems ,can you merge this?

Links

Screenshot

output

}

public FadeOutTransition(Context context, AttributeSet attrs) {
super(context, attrs);
Copy link
Contributor

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,
Copy link
Contributor

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 {
Copy link
Contributor

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"
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

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() {
Copy link
Contributor

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,
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

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 {
Copy link
Contributor

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);
Copy link
Contributor

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]

@konifar
Copy link
Contributor

konifar commented Mar 7, 2017

Cool 🆒
This is related with your session, right? 😃
I'm for your suggestion.

@takahirom
Copy link
Member Author

Thanks!
That's right.
I will talk about this pull request contents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants