本文整理汇总了Java中android.view.ActionMode.Callback类的典型用法代码示例。如果您正苦于以下问题:Java Callback类的具体用法?Java Callback怎么用?Java Callback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Callback类属于android.view.ActionMode包,在下文中一共展示了Callback类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCheckedChanged
import android.view.ActionMode.Callback; //导入依赖的package包/类
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();
}
}
}
示例2: getActionModeCallback
import android.view.ActionMode.Callback; //导入依赖的package包/类
@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;
}
示例3: onWindowStartingActionMode
import android.view.ActionMode.Callback; //导入依赖的package包/类
@Nullable
@Override
public ActionMode onWindowStartingActionMode(Callback callback) {
ActionMode mode = mEventDispatcher.getEventDispatcher().onActivityWindowStartingActionMode(this, callback);
if (mode == null) {
return super.onWindowStartingActionMode(callback);
} else {
return mode;
}
}
示例4: setUpItemClickListener
import android.view.ActionMode.Callback; //导入依赖的package包/类
/**
* 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);
}
});
}
示例5: startActionMode
import android.view.ActionMode.Callback; //导入依赖的package包/类
@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);
}
示例6: onWindowStartingActionMode
import android.view.ActionMode.Callback; //导入依赖的package包/类
@Override
public ActionMode onWindowStartingActionMode(Callback callback)
{
QtApplication.InvokeResult res = QtApplication.invokeDelegate(callback);
if (res.invoked)
return (ActionMode)res.methodReturns;
else
return super.onWindowStartingActionMode(callback);
}
示例7: getActionModeCallback
import android.view.ActionMode.Callback; //导入依赖的package包/类
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;
}
示例8: onActivityWindowStartingActionMode
import android.view.ActionMode.Callback; //导入依赖的package包/类
@Override
public ActionMode onActivityWindowStartingActionMode(T activity, Callback callback, int type) {
return null;
}
示例9: setCustomSelectionActionModeCallback
import android.view.ActionMode.Callback; //导入依赖的package包/类
/**
* @see TextView#setCustomSelectionActionModeCallback(Callback)
*/
public W setCustomSelectionActionModeCallback(Callback actionModeCallback) {
mView.setCustomSelectionActionModeCallback(actionModeCallback);
return (W) this;
}
示例10: C0252h
import android.view.ActionMode.Callback; //导入依赖的package包/类
public C0252h(Context context, Callback callback) {
this.f861b = context;
this.f860a = callback;
this.f862c = new ArrayList();
this.f863d = new C0106n();
}
示例11: startActionModeForChild
import android.view.ActionMode.Callback; //导入依赖的package包/类
public ActionMode startActionModeForChild(View view, Callback callback) {
return null;
}
示例12: startActionModeForChild
import android.view.ActionMode.Callback; //导入依赖的package包/类
public ActionMode startActionModeForChild(View paramView, ActionMode.Callback paramCallback)
{
return null;
}
示例13: startActionMode
import android.view.ActionMode.Callback; //导入依赖的package包/类
public ActionMode startActionMode(Callback callback) {
return mHostActivity.startActionMode(callback);
}
示例14: onWindowStartingActionMode
import android.view.ActionMode.Callback; //导入依赖的package包/类
public ActionMode onWindowStartingActionMode(Callback callback) {
return null;
}
示例15: onWindowStartingActionMode
import android.view.ActionMode.Callback; //导入依赖的package包/类
@Override
public ActionMode onWindowStartingActionMode(Callback callback) {
return super.onWindowStartingActionMode(callback);
}