Example usage for android.view ContextMenu add

List of usage examples for android.view ContextMenu add

Introduction

In this page you can find the example usage for android.view ContextMenu add.

Prototype

public MenuItem add(int groupId, int itemId, int order, CharSequence title);

Source Link

Document

Add a new item to the menu.

Usage

From source file:test.red.house.DeviceFragment.java

@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo);
    menu.setHeaderTitle("Options");
    menu.add(0, v.getId(), 0, "Remove Device");

}

From source file:com.commonsware.cwac.loaderex.demo.ConstantsBrowserACL.java

@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
    menu.add(Menu.NONE, DELETE_ID, Menu.NONE, "Delete").setAlphabeticShortcut('d');
}

From source file:ca.cs.ualberta.localpost.view.FreshestTabView.java

@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo);
    menu.add(0, Menu.FIRST, 0, "UpRad");
    menu.add(0, Menu.FIRST + 1, 0, "DownRad");
    menu.add(0, Menu.FIRST + 2, 0, "Favorite");
}

From source file:com.androidinspain.deskclock.ringtone.RingtoneViewHolder.java

@Override
public void onCreateContextMenu(ContextMenu contextMenu, View view,
        ContextMenu.ContextMenuInfo contextMenuInfo) {
    notifyItemClicked(RingtoneViewHolder.CLICK_LONG_PRESS);
    contextMenu.add(Menu.NONE, 0, Menu.NONE, R.string.remove_sound);
}

From source file:de.nico.ha_manager.activities.Main.java

@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo);
    menu.add(0, v.getId(), 0, getString(R.string.dialog_edit));
    menu.add(0, v.getId(), 1, getString(R.string.dialog_delete));
}

From source file:com.ratebeer.android.gui.fragments.OfflineRatingsFragment.java

@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
    menu.add(Menu.NONE, MENU_DELETE, MENU_DELETE, R.string.rate_offline_delete);
}

From source file:test.red.house.SensorFragment.java

@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {

    super.onCreateContextMenu(menu, v, menuInfo);
    menu.setHeaderTitle("Options");
    menu.add(1, v.getId(), 0, "Remove Sensor");

}

From source file:com.tastycactus.timesheet.TimeEntriesActivity.java

@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo);
    menu.add(Menu.NONE, DELETE_TIME_ENTRY_MENU_ITEM, Menu.NONE, "Delete Time Entry");
    menu.add(Menu.NONE, EDIT_TIME_ENTRY_MENU_ITEM, Menu.NONE, "Edit Time Entry");
}

From source file:de.hshannover.f4.trust.ironcontrol.view.list_activities.ListResponsesActivity.java

@Override
protected void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo, ListHierarchyType type) {
    menu.add(0, REMOVE_ID, 0, R.string.remove);
}

From source file:org.sensapp.android.sensappdroid.fragments.GraphsListFragment.java

@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo);
    menu.add(0, MENU_DELETE_ID, 0, "Delete graph");
    menu.add(0, MENU_MANAGE_ID, 0, "Manage graph sensors");
}