postInvalidateOnAnimation was introduced in API level 16, while we want to support API level 9, so replaced it with postInvalidate