Change text dynamically for Android Actionbar Button -
I have an action bar (using actionbarslocks) in which it has two items, among which one user collected in my app The number of points is the number. I want to change this action bar button when the quantity change changes.
I do not know how to set the text of that button. What can I do to set this code through?
First you do not set "TextView One Button", because the button increases textview, The text itself is set up, you can try it in the following way at If you use the menu item, then you should try this approach: Also try this, and It should be helpful. onCreate () :
// of your activity. I think you create custom actionbase of this last choice: addView = getActivity (see) .getLayoutInflater (). Flow (R. layout.my_action_bar, tap); Bar.setCustomView (addView); Button = (button) addView.findViewById (R.id.button); Button.setText ("whatever");
getSupportMenuInflater (). Flood (R. menu activation menu, menu); Menu item item = menu.findItem (R.id.menuSearch);
Comments
Post a Comment