is it possible to get current frame number in android animation

I am developing an application in which i want to change the text-view after few frames load like first text-view will be default then after 4 frames load text view should change then again after 9 frames load text-view should change. how can i do this?

You can do this by overriding selectDrawable(int idx) method of AnimationDrawable class. For that You should create custom class which extends AnimationDrawable declares interface OnFrameChangeListener and raises an onFrameChanged() method when frame changed like this: