I have an Action Bar (using actionbarsherlock) that has two items in it. One of them is the amount of points the user has collected in my app. I want to change this Action Bar Button when the amount of points changes.
I can’t figure out how to set the TextView of that Button. What can I do to set that via code?
First of all you don’t set “TextView of a Button”, because Button extends TextView, you set text of the Button itself. You can try to do this the following way in your activity’s
onCreate():If you use menu items, then you should try this approach:
Also try looking here,here and here. It should be helpful.