是否可以设置标志的建议这里 安卓?showAsAction =ifRoom | withText
编程
Is it possible to set the flags as suggested here android:showAsAction="ifRoom|withText"
programmatically?
对于每个菜单项
,请执行以下操作:
For each MenuItem
, do the following:
myMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);