Closed molleman closed 13 years ago
Hi,
I would suggest you to try the new version that is in the branch mimic-native-api. Then you can simply use setIcon
on the action.
Hi Johan, I can't find a "setIcon" example anywhere in the mimic-native-api source. Would you please provide me with a one line example. Thank you for this great project.
setIcon
is part of the Action
class, an instance of which represents each action item that appears on the action bar. There are two methods to set the icon on these instances. The associated source code is located here.
ActionBar.Action action = mActionBar.newAction()
.setIcon(R.drawable.ic_star)
.setOnMenuItemClickListener(/*...*/);
mActionBar.addAction(action);
I'm a total GIT noob and I was cloning the android-actionbar master branch not the mimi-native-api code. I've down'ed a .zip of the mimic' repo and will see if I can make it work.
Thank you for your help.
Yes this is only available in that branch and of course in @JakeWharton's awesome Sherlock. Please let us know if you run into any problems.
So, what's the solution if I use the original library?
Hello ,
I am currently using this actionbar in my application. One thing i cannot do though is changing a image of a button on the action bar.
So the button on the action bar controls a viewflipper below. when the view changes in the viewflipper i want to the button in the action bar to change also .
Is there any way of programitcally changing the action button dynamically?