I'm trying to play a gif using the Movie
object and it requires me to call the invalidate()
method. However whenever I call this method I get the following error:
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
How do I fix this and why is it happening