protected void onCheckedChanged(RecyclerView view, RecyclerViewSelectionManager manager, boolean triggerMode) { if (!manager.getSelectedItems().isEmpty()) { if (mMode == null) { if (triggerMode) { Callback callback = getActionModeCallback(manager.getSelectedItems()); if (callback != null) { mMode = view.startActionMode(callback); mMode.invalidate(); } } } else { mMode.invalidate(); } } else { if (mMode != null) { mMode.finish(); } } }
@Override protected Callback getActionModeCallback(List<Object> objects) { for (Object o : objects) { if (o instanceof EquippedItem) return mItemsCallback; else if (o instanceof CustomModificator) return mModifiersCallback; else if (o instanceof CustomProbe) return mCustomProbeCallback; else if (o instanceof Talent) return mTalentCallback; else if (o instanceof Spell) return mSpellCallback; else if (o instanceof Art) return mArtCallback; else if (o instanceof NotesItem) return mNotesCallback; } return null; }
@Nullable @Override public ActionMode onWindowStartingActionMode(Callback callback) { ActionMode mode = mEventDispatcher.getEventDispatcher().onActivityWindowStartingActionMode(this, callback); if (mode == null) { return super.onWindowStartingActionMode(callback); } else { return mode; } }
@Nullable @Override public ActionMode onWindowStartingActionMode(Callback callback, int type) { ActionMode mode = mEventDispatcher.getEventDispatcher().onActivityWindowStartingActionMode(this, callback, type); if (mode == null) { return super.onWindowStartingActionMode(callback, type); } else { return mode; } }
/** * Sets up the item click listener for when a tag is selected. * @param clickCallback The Callback for when selected. */ protected void setUpItemClickListener(final Callback clickCallback) { getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { pressedItemIndex = position; startActionMode(clickCallback); } }); }
@Override public ActionMode startActionMode(Callback callback) { String name = callback.getClass().toString(); if (name.contains("SelectActionModeCallback")) { selectActionModeCallback = callback; } actionModeCallback = new CustomActionModeCallback(); return super.startActionModeForChild(this, actionModeCallback); }
@Override public ActionMode onWindowStartingActionMode(Callback callback) { QtApplication.InvokeResult res = QtApplication.invokeDelegate(callback); if (res.invoked) return (ActionMode)res.methodReturns; else return super.onWindowStartingActionMode(callback); }
protected Callback getActionModeCallback(List<Object> objects) { if (objects == null || objects.isEmpty()) return null; for (Object obj : objects) { if (obj instanceof ItemContainer) { return mContainerCallback; } else if (obj instanceof ItemCard) { return mItemGridCallback; } } return null; }
@Override public ActionMode onActivityWindowStartingActionMode(T activity, Callback callback, int type) { return null; }
@Override public ActionMode onActivityWindowStartingActionMode(T activity, Callback callback) { return null; }
/** * @see TextView#setCustomSelectionActionModeCallback(Callback) */ public W setCustomSelectionActionModeCallback(Callback actionModeCallback) { mView.setCustomSelectionActionModeCallback(actionModeCallback); return (W) this; }
public C0252h(Context context, Callback callback) { this.f861b = context; this.f860a = callback; this.f862c = new ArrayList(); this.f863d = new C0106n(); }
public ActionMode startActionModeForChild(View view, Callback callback) { return null; }
public ActionMode startActionModeForChild(View paramView, ActionMode.Callback paramCallback) { return null; }
public ActionMode startActionMode(Callback callback) { return mHostActivity.startActionMode(callback); }
public ActionMode onWindowStartingActionMode(Callback callback) { return null; }
@Override public ActionMode onWindowStartingActionMode(Callback callback) { return super.onWindowStartingActionMode(callback); }
public android.support.v7.view.ActionMode startSupportActionMode( android.support.v7.view.ActionMode.Callback callback) { return mHostActivity.startSupportActionMode(callback); }