I am writing a custom view that animates. Would it be better for the View to get access to it’s parent Activity through casting the getContext() method to the Activity and then calling Activity.runOnUiThread or would it be better to simply use a handler and post View.invalidate messages?
Share
Easier way – call postInvalidate method of view. This can be called on non-ui thread.