Android custom revel animation over image -
i looking reveal animation on top of image.
- user clicks on thumbnail , opens image in full-screen looks (a). i.e, image covered.
- user clicks button , image starts reveal top bottom. going (a) -> (b) -> (c) in smooth transition.
the closest found https://www.youtube.com/watch?v=25ul2xs4u7u
for reveal animation, can use github library if you're targetsdkversion below 15 else can use below code.
private void show(final view view) { int cx = (view.getleft() + view.getright()) / 2; int cy = (view.gettop() + view.getbottom()) / 2; int finalradius = math.max(view.getwidth(), view.getheight()); animator anim = viewanimationutils.createcircularreveal(view, cx, cy, 0, finalradius); anim.setduration(1000); view.setvisibility(view.visible); anim.start(); } private void hide(final view view) { int cx = (view.getleft() + view.getright()) / 2; int cy = (view.gettop() + view.getbottom()) / 2; int initialradius = view.getwidth(); animator anim = viewanimationutils.createcircularreveal(view, cx, cy, initialradius, 0); anim.setduration(1000); anim.addlistener(new animatorlisteneradapter() { @override public void onanimationend(animator animation) { super.onanimationend(animation); view.setvisibility(view.invisible); } }); anim.start(); } link:
https://github.com/hendraanggrian/reveallayout
https://github.com/jaouan/revealator
http://www.edumobile.org/android/reveal-animation-example-introduced-in-android-5-0/

Comments
Post a Comment