Yalantis / StarWars.Android

This component implements transition animation to crumble view into tiny pieces.
https://yalantis.com/blog/star-wars-the-force-awakens-or-how-to-crumble-view-into-tiny-pieces-on-android/
MIT License
1.95k stars 303 forks source link

Redrawing the view #4

Closed PGMacDesign closed 8 years ago

PGMacDesign commented 8 years ago

Hey guys, not a bug, but a Question, After the view gets obliterated via the call to startAnimation(), how do I go about redrawing it or making the view visible again? My goal is to have the ImageView disappear (shatter) using the animation, and then have it come back into view with a new image. Thanks for the help and the awesome project guys! It's really well done!

PGMacDesign commented 8 years ago

So.... can this not be done then? I assume not since this was closed without any more info...

defHLT commented 8 years ago

Hi, It was auto closed by the commit message. Please check new version 0.1.1. It might take some time for maven repository to update. Then you may try to add your view after animation has ended:

    @Override
    public void onAnimationFinished() {
        mTilesFrameLayout.addView(view, 0);
    }

view can be newly inflated view or the same view that was inside of TilesFrameLayout initially. Let me know how that works for you. Thanks for your feedback, I'm glad you enjoy the lib :)

PGMacDesign commented 8 years ago

Ah excellent, thank you mlatu, I will test in the morning. And love the library! You guys at Yalantis always have some of the best stuff around!

PGMacDesign commented 8 years ago

Works perfect. Thanks again guys.