Example usage for android.support.v4.internal.view SupportMenuItem SHOW_AS_ACTION_ALWAYS

List of usage examples for android.support.v4.internal.view SupportMenuItem SHOW_AS_ACTION_ALWAYS

Introduction

In this page you can find the example usage for android.support.v4.internal.view SupportMenuItem SHOW_AS_ACTION_ALWAYS.

Prototype

int SHOW_AS_ACTION_ALWAYS

To view the source code for android.support.v4.internal.view SupportMenuItem SHOW_AS_ACTION_ALWAYS.

Click Source Link

Usage

From source file:org.telegram.ui.LocationActivity.java

@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    SupportMenuItem item = (SupportMenuItem) menu
            .add(Menu.NONE, map_to_my_location, Menu.NONE,
                    LocaleController.getString("MyLocation", R.string.MyLocation))
            .setIcon(R.drawable.ic_ab_location);
    item.setShowAsAction(SupportMenuItem.SHOW_AS_ACTION_ALWAYS);

    menu.add(Menu.NONE, map_list_menu_map, Menu.NONE, LocaleController.getString("Map", R.string.Map));
    menu.add(Menu.NONE, map_list_menu_satellite, Menu.NONE,
            LocaleController.getString("Satellite", R.string.Satellite));
    menu.add(Menu.NONE, map_list_menu_hybrid, Menu.NONE, LocaleController.getString("Hybrid", R.string.Hybrid));
}

From source file:org.telegram.ui.SettingsBlockedUsers.java

public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    SupportMenuItem item = (SupportMenuItem) menu.add(Menu.NONE, block_user, Menu.NONE, null)
            .setIcon(R.drawable.plus);//from  w w w.  j  a  v  a 2  s .c o  m
    item.setShowAsAction(SupportMenuItem.SHOW_AS_ACTION_ALWAYS);
}