开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜