Skip to content

On rotate device. #9

@ikermart

Description

@ikermart

First of all thank you for your good work on this library.
When I add animation, to a content of views like this:
In onCreateView() of my Fragment, using ButterKnife.bind(this, view);

itisfListLayout.setInAnimator(new PropertyIn(View.TRANSLATION_Y, itisfRootLayout.getHeight(), 0).setDuration(500));
 itisfListLayout.setOutAnimator(new PropertyOut(View.TRANSLATION_Y, 0, -itisfRootLayout.getHeight()).setDuration(500));
 itisfListLayout.setLocationType(CannyViewAnimator.IN_ALWAYS_TOP);
 itisfListLayout.setAnimateType(CannyViewAnimator.TOGETHER);
 itisfListLayout.setDisplayedChildIndex(itisfListLayout.getDisplayedChildIndex() + 1);

The animation works well, but when I rotate de device NullPointerException error appears:
Caused by: java.lang.NullPointerException
at com.livetyping.library.CannyViewAnimator.changeVisibility(CannyViewAnimator.java:114)
at com.livetyping.library.ViewAnimator.setDisplayedChildIndex(ViewAnimator.java:37)
at com.livetyping.library.ViewAnimator.onRestoreInstanceState(ViewAnimator.java:170)
at android.view.View.dispatchRestoreInstanceState(View.java:12284)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2620)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2626)
at android.view.View.restoreHierarchyState(View.java:12262)

Any idea how is this happening?
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions