예제 #1
0
  public void onCreateContextMenu(ContextMenu menu) {
    super.onCreateContextMenu(menu);

    menu.setHeaderTitle("MyImage Menu");
    menu.add(0, 100, 0, "이미지 회전");
    menu.add(0, 101, 0, "크기 변경");
  }
예제 #2
0
 public void onCreateContextMenu(
     ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) {
   final int position = ((AdapterView.AdapterContextMenuInfo) menuInfo).position;
   if (getItem(position) != null) {
     menu.setHeaderTitle(getItem(position).getText());
     menu.add(0, OPEN_ITEM_ID, 0, myResource.getResource("open").getValue());
     // menu.add(0, EDIT_ITEM_ID, 0, myResource.getResource("edit").getValue());
     menu.add(0, DELETE_ITEM_ID, 0, myResource.getResource("delete").getValue());
   }
 }
예제 #3
0
  public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo);

    if (v == mBtn) {
      menu.setHeaderTitle("Button Menu");
      menu.add(0, 1, 0, "Red");
      menu.add(0, 2, 0, "Green");
      menu.add(0, 3, 0, "Blue");
    }

    if (v == mEdit) {
      menu.add(0, 4, 0, "번역하기");
      menu.add(0, 5, 0, "필기 인식");
    }
  }