Java 类android.view.ActionMode.Callback 实例源码

项目:DsaTab    文件:BaseRecyclerFragment.java   
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();
            }
        }
    }
项目:DsaTab    文件:ListableFragment.java   
@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;
}
项目:homunculus    文件:EventAppCompatActivity.java   
@Nullable
@Override
public ActionMode onWindowStartingActionMode(Callback callback) {
    ActionMode mode = mEventDispatcher.getEventDispatcher().onActivityWindowStartingActionMode(this, callback);
    if (mode == null) {
        return super.onWindowStartingActionMode(callback);
    } else {
        return mode;
    }
}
项目:homunculus    文件:EventAppCompatActivity.java   
@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;
    }
}
项目:Team9Project    文件:TagAddToClaimActivity.java   
/**
 * 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);
        }
    });
}
项目:ilearnrw-reader    文件:ExtendedWebView.java   
@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);
}
项目:OSGeo4A    文件:QtActivity.java   
@Override
public ActionMode onWindowStartingActionMode(Callback callback)
{
    QtApplication.InvokeResult res = QtApplication.invokeDelegate(callback);
    if (res.invoked)
        return (ActionMode)res.methodReturns;
    else
        return super.onWindowStartingActionMode(callback);
}
项目:OSGeo4A    文件:QtActivity.java   
@Override
public ActionMode onWindowStartingActionMode(Callback callback)
{
    QtApplication.InvokeResult res = QtApplication.invokeDelegate(callback);
    if (res.invoked)
        return (ActionMode)res.methodReturns;
    else
        return super.onWindowStartingActionMode(callback);
}
项目:DsaTab    文件:ItemsFragment.java   
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;

}
项目:homunculus    文件:ActivityEventDispatcher.java   
@Override
public ActionMode onActivityWindowStartingActionMode(T activity, Callback callback, int type) {
    return null;
}
项目:homunculus    文件:ActivityEventDispatcher.java   
@Override
public ActionMode onActivityWindowStartingActionMode(T activity, Callback callback) {
    return null;
}
项目:AndroidViewHelper    文件:TextViewWrapper.java   
/**
* @see TextView#setCustomSelectionActionModeCallback(Callback)
*/
 public W setCustomSelectionActionModeCallback(Callback actionModeCallback) {
     mView.setCustomSelectionActionModeCallback(actionModeCallback);
     return (W) this;
 }
项目:solved-hacking-problem    文件:C0252h.java   
public C0252h(Context context, Callback callback) {
    this.f861b = context;
    this.f860a = callback;
    this.f862c = new ArrayList();
    this.f863d = new C0106n();
}
项目:solved-hacking-problem    文件:ActionBarContainer.java   
public ActionMode startActionModeForChild(View view, Callback callback) {
    return null;
}
项目:solved-hacking-problem    文件:C0252h.java   
public C0252h(Context context, Callback callback) {
    this.f861b = context;
    this.f860a = callback;
    this.f862c = new ArrayList();
    this.f863d = new C0106n();
}
项目:solved-hacking-problem    文件:ActionBarContainer.java   
public ActionMode startActionModeForChild(View view, Callback callback) {
    return null;
}
项目:FMTech    文件:ActionBarContainer.java   
public ActionMode startActionModeForChild(View paramView, ActionMode.Callback paramCallback)
{
  return null;
}
项目:FMTech    文件:ActionBarContainer.java   
public ActionMode startActionModeForChild(View paramView, ActionMode.Callback paramCallback)
{
  return null;
}
项目:ApkLauncher    文件:Target_Activity.java   
public ActionMode startActionMode(Callback callback) {
    return mHostActivity.startActionMode(callback);
}
项目:ApkLauncher    文件:Target_Activity.java   
public ActionMode onWindowStartingActionMode(Callback callback) {
    return null;
}
项目:ApkLauncher    文件:Target_ActivityGroup.java   
public ActionMode startActionMode(Callback callback) {
    return mHostActivity.startActionMode(callback);
}
项目:ApkLauncher    文件:Target_ActivityGroup.java   
public ActionMode onWindowStartingActionMode(Callback callback) {
    return null;
}
项目:ApkLauncher    文件:Target_TabActivity.java   
public ActionMode startActionMode(Callback callback) {
    return mHostActivity.startActionMode(callback);
}
项目:ApkLauncher    文件:Target_TabActivity.java   
public ActionMode onWindowStartingActionMode(Callback callback) {
    return null;
}
项目:ApkLauncher    文件:Target_ListActivity.java   
public ActionMode startActionMode(Callback callback) {
    return mHostActivity.startActionMode(callback);
}
项目:ApkLauncher    文件:Target_ListActivity.java   
public ActionMode onWindowStartingActionMode(Callback callback) {
    return null;
}
项目:ApkLauncher    文件:StubBase_ActivityGroup.java   
@Override
public ActionMode onWindowStartingActionMode(Callback callback) {
    return super.onWindowStartingActionMode(callback);
}
项目:ApkLauncher    文件:StubBase_ListActivity.java   
@Override
public ActionMode onWindowStartingActionMode(Callback callback) {
    return super.onWindowStartingActionMode(callback);
}
项目:ApkLauncher    文件:StubBase_ExpandableListActivity.java   
@Override
public ActionMode onWindowStartingActionMode(Callback callback) {
    return super.onWindowStartingActionMode(callback);
}
项目:ApkLauncher    文件:StubBase_PreferenceActivity.java   
@Override
public ActionMode onWindowStartingActionMode(Callback callback) {
    return super.onWindowStartingActionMode(callback);
}
项目:ApkLauncher    文件:Target_FragmentActivity.java   
public ActionMode startActionMode(Callback callback) {
    return mHostActivity.startActionMode(callback);
}
项目:ApkLauncher    文件:Target_FragmentActivity.java   
public ActionMode onWindowStartingActionMode(Callback callback) {
    return null;
}
项目:ApkLauncher    文件:StubBase_ActionBarActivity.java   
@Override
public ActionMode onWindowStartingActionMode(Callback callback) {
    return super.onWindowStartingActionMode(callback);
}
项目:ApkLauncher    文件:StubBase_TabActivity.java   
@Override
public ActionMode onWindowStartingActionMode(Callback callback) {
    return super.onWindowStartingActionMode(callback);
}
项目:ApkLauncher    文件:Target_PreferenceActivity.java   
public ActionMode startActionMode(Callback callback) {
    return mHostActivity.startActionMode(callback);
}
项目:ApkLauncher    文件:Target_PreferenceActivity.java   
public ActionMode onWindowStartingActionMode(Callback callback) {
    return null;
}
项目:ApkLauncher    文件:StubBase_Activity.java   
@Override
public ActionMode onWindowStartingActionMode(Callback callback) {
    return super.onWindowStartingActionMode(callback);
}
项目:ApkLauncher    文件:Target_ActionBarActivity.java   
public ActionMode startActionMode(Callback callback) {
    return mHostActivity.startActionMode(callback);
}
项目:ApkLauncher    文件:Target_ActionBarActivity.java   
public ActionMode onWindowStartingActionMode(Callback callback) {
    return null;
}
项目:ApkLauncher    文件:Target_ActionBarActivity.java   
public android.support.v7.view.ActionMode startSupportActionMode(
        android.support.v7.view.ActionMode.Callback callback) {
    return mHostActivity.startSupportActionMode(callback);
}