Back to project page Feeder.
The source code is released under:
GNU General Public License
If you think the Android project Feeder listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.stoyanr.feeder.util; // w w w .jav a2 s . com import static android.support.v4.view.MenuItemCompat.SHOW_AS_ACTION_ALWAYS; import static android.support.v4.view.MenuItemCompat.SHOW_AS_ACTION_IF_ROOM; import static android.support.v4.view.MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT; import android.support.v4.view.MenuItemCompat; import android.view.Menu; import android.view.MenuItem; public class MenuUtils { public static void setShowAsActionAll(Menu menu) { for (int i = 0; i < menu.size(); i++) { MenuItem mi = menu.getItem(i); int x = (i <= 2) ? SHOW_AS_ACTION_ALWAYS : SHOW_AS_ACTION_IF_ROOM; MenuItemCompat.setShowAsAction(mi, x | SHOW_AS_ACTION_WITH_TEXT); } } }