Android Animation : View directly change to end position -



assignment create game candy crush saga , flow android platform. i've try tutorial event listener , animation, work got problem when animate imageview change position. want make change position between 2 imageview when swipe on of imageview (candy crush gameplay), changed position problem animation movement not working. when swipe 1 of imageview (right swipe example), imageview changed position imageview located beside don't see movement animation when play candy crush saga.

use 2 objectanimator animate imageview , play when swipe event trigger on imageview. animation code.

final string name = "x"; imageview target = (imageview) findviewbyid(id[x-1][y-1]); imageview next = (imageview) findviewbyid(id[x-1][y]); objectanimator atarget = objectanimator.offloat(target, name, target.getx(), (target.getx()+target.getwidth()));    atarget.setduration(1000);    atarget.setinterpolator(new linearinterpolator()); objectanimator anext = objectanimator.offloat(next, name, next.getx(), (next.getx()-next.getwidth()));    anext.setduration(1000);    anext.setinterpolator(new linearinterpolator()); animatorset moveset = new animatorset(); moveset.playtogether(atarget, anext); moveset.start(); 

i use id array save imageview's id , using 'for' compare view's id trigger swipe event list id inside id array can find imageview choosen moved (target) , other imageview changed position choosen one. don't understand wrong code, code animation tutorial source code
http://www.101apps.co.za/articles/a-property-animation-tutorial.html
works when run application when try implement application got problem.
hope can me, before.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -