Is there a way to keep a button animated while its touched and then when its released go back to normal?
I c开发者_JS百科an get the button to animate when it is touched but only for a set time/repeat interval. i just want a scale animation so it grows in size while touched
Yes, you should be able to animate a button when it is touched and for a set period of time...repeat...etc.
Take a look at Animation Section
boolean getTransformation(long currentTime, Transformation outTransformation, float scale)
Gets the transformation to apply at a specified point in time.
void restrictDuration(long durationMillis) Ensure that the duration that this animation will run is not longer than durationMillis.
long getDuration() How long this animation should last
int getRepeatCount() Defines how many times the animation should repeat.
I hope this helps you out.
精彩评论