I am using the developer guide (http://developer.android.com/guide/topics/graphics/drawable-animation.html) to create a animating record button, Making minor changes to accomadate an actionbar menuitem instead of an imageView. When I call the onStart it does not play?
Here is the code im using
RecordButton.setIcon(R.drawable.recordbutton);
recordAnimation = (AnimationDrawable) RecordButton.getIcon();
recordAnimation.start();
Does anyone know why its not playing?
I had the same problem. I was able to get around it by using an action bar provider as described here: http://developer.android.com/guide/topics/ui/actionbar.html#ActionProvider
Skip the ShareActionProvider and create a custom one. This lets you use a custom layout for your action bar item (an ImageView in this case) that you can manipulate as described in your link to the Drawable Animation guide.