Beispiel #1
0
 public bool OnLongClick(View v)
 {
   if (actionMode != null)
     return false;
   else
     actionMode = mainActivity.StartActionMode(this);
   return true;
 }
Beispiel #2
0
 /** This is called when an item in the context menu is selected */
 public bool OnActionItemClicked(ActionMode mode, IMenuItem item)
 {
   switch (item.GetItemId())
   {
     case R.Ids.submenu:
       Toast.MakeText(mainActivity.GetBaseContext(), "Selected Action1 ", Toast.LENGTH_LONG).Show();
       mode.Finish();    // Automatically exists the action mode, when the user selects this action
       break;
   }
   return false;
 }
Beispiel #3
0
 /** This is called when the action mode is created. This is called by startActionMode() */
 public bool OnCreateActionMode(ActionMode mode, IMenu menu)
 {
   //mode.SetTitle("Demo");
   mainActivity.GetMenuInflater().Inflate(R.Menus.OptionsMenu, menu);
   return true;
 }
Beispiel #4
0
 /** Called when user exits action mode */
 public void OnDestroyActionMode(ActionMode mode)
 {
   actionMode = null;
 }
Beispiel #5
0
 /** Invoked whenever the action mode is shown. This is invoked immediately after onCreateActionMode */
 public bool OnPrepareActionMode(ActionMode mode, IMenu menu)
 {
   return false;
 }