本文整理汇总了Java中android.view.ActionMode.Callback类的典型用法代码示例。如果您正苦于以下问题:Java Callback类的具体用法?Java Callback怎么用?Java Callback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Callback类属于android.view.ActionMode包,在下文中一共展示了Callback类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
}
}
开发者ID:gandulf,项目名称:DsaTab,代码行数:21,代码来源:BaseRecyclerFragment.java
示例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;
}
开发者ID:gandulf,项目名称:DsaTab,代码行数:23,代码来源:ListableFragment.java
示例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;
}
}
开发者ID:worldiety,项目名称:homunculus,代码行数:11,代码来源:EventAppCompatActivity.java
示例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);
}
});
}
开发者ID:CMPUT301W15T09,项目名称:Team9Project,代码行数:14,代码来源:TagAddToClaimActivity.java
示例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);
}
开发者ID:mpakarlsson,项目名称:ilearnrw-reader,代码行数:11,代码来源:ExtendedWebView.java
示例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);
}
开发者ID:opengisch,项目名称:OSGeo4A,代码行数:10,代码来源:QtActivity.java
示例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;
}
开发者ID:gandulf,项目名称:DsaTab,代码行数:15,代码来源:ItemsFragment.java
示例8: onActivityWindowStartingActionMode
import android.view.ActionMode.Callback; //导入依赖的package包/类
@Override
public ActionMode onActivityWindowStartingActionMode(T activity, Callback callback, int type) {
return null;
}
开发者ID:worldiety,项目名称:homunculus,代码行数:5,代码来源:ActivityEventDispatcher.java
示例9: setCustomSelectionActionModeCallback
import android.view.ActionMode.Callback; //导入依赖的package包/类
/**
* @see TextView#setCustomSelectionActionModeCallback(Callback)
*/
public W setCustomSelectionActionModeCallback(Callback actionModeCallback) {
mView.setCustomSelectionActionModeCallback(actionModeCallback);
return (W) this;
}
开发者ID:AnthZh,项目名称:AndroidViewHelper,代码行数:8,代码来源:TextViewWrapper.java
示例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();
}
开发者ID:Qwaz,项目名称:solved-hacking-problem,代码行数:7,代码来源:C0252h.java
示例11: startActionModeForChild
import android.view.ActionMode.Callback; //导入依赖的package包/类
public ActionMode startActionModeForChild(View view, Callback callback) {
return null;
}
开发者ID:Qwaz,项目名称:solved-hacking-problem,代码行数:4,代码来源:ActionBarContainer.java
示例12: startActionModeForChild
import android.view.ActionMode.Callback; //导入依赖的package包/类
public ActionMode startActionModeForChild(View paramView, ActionMode.Callback paramCallback)
{
return null;
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:5,代码来源:ActionBarContainer.java
示例13: startActionMode
import android.view.ActionMode.Callback; //导入依赖的package包/类
public ActionMode startActionMode(Callback callback) {
return mHostActivity.startActionMode(callback);
}
开发者ID:luoqii,项目名称:ApkLauncher,代码行数:4,代码来源:Target_Activity.java
示例14: onWindowStartingActionMode
import android.view.ActionMode.Callback; //导入依赖的package包/类
public ActionMode onWindowStartingActionMode(Callback callback) {
return null;
}
开发者ID:luoqii,项目名称:ApkLauncher,代码行数:4,代码来源:Target_Activity.java
示例15: onWindowStartingActionMode
import android.view.ActionMode.Callback; //导入依赖的package包/类
@Override
public ActionMode onWindowStartingActionMode(Callback callback) {
return super.onWindowStartingActionMode(callback);
}
开发者ID:luoqii,项目名称:ApkLauncher,代码行数:5,代码来源:StubBase_ActivityGroup.java
示例16: startSupportActionMode
import android.view.ActionMode.Callback; //导入依赖的package包/类
public android.support.v7.view.ActionMode startSupportActionMode(
android.support.v7.view.ActionMode.Callback callback) {
return mHostActivity.startSupportActionMode(callback);
}
开发者ID:luoqii,项目名称:ApkLauncher,代码行数:5,代码来源:Target_ActionBarActivity.java
注:本文中的android.view.ActionMode.Callback类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论