I cannot find any way to edit the text of a button that shows on the action bar.
res/menu.main.xml
<item
android:id="@+id/action_data"
android:title="@string/action_date"
app:showAsAction="withText|ifRoom"/>
And this what and how i'm trying to achive it:
MenuItem b = (MenuItem) findViewById(R.id.action_data);
b.setTitle(new SimpleDateFormat("dd-MM-yy").format(c));
Thanks for your help!
No comments:
Post a Comment