-1

I'm having an issue with my Android application.

I have a button and a textView. When the button is clicked, the textview move with a translate and a rotate, then a Timer is set to change the content of the TextView each second.

The problem is that when I start the animation, and then start the timer, the view is no longer updated. Until I stop the timer! When the timer is stopped, the view take the last value affected in this timer.

Here is the code: http://pastebin.com/n1e1djdX

EDIT:

Solved with http://developer.android.com/guide/topics/graphics/prop-animation.html

Bart Kiers
  • 166,582
  • 36
  • 299
  • 288
Okaa-Pi
  • 135
  • 10

3 Answers3

1

try Property Animation, it can help you. see http://developer.android.com/guide/topics/graphics/prop-animation.html

HalZhang
  • 206
  • 1
  • 6
1

Non primary thread cannot access or modify UI Views. You must use Handlers or AsyncTask classes with onProgressChanged() method overridden.

Take a look here

Community
  • 1
  • 1
Cob013
  • 1,057
  • 9
  • 22
0

You can only use Property Animation on Honeycomb and up. Try downloading NineOldAndroids library (http://nineoldandroids.com/), that way you get the Android 3.0+ animation API on all versions of the platform back to 1.0

edid
  • 41
  • 2