本文整理汇总了Java中android.view.View.OnLongClickListener方法的典型用法代码示例。如果您正苦于以下问题:Java View.OnLongClickListener方法的具体用法?Java View.OnLongClickListener怎么用?Java View.OnLongClickListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.View
的用法示例。
在下文中一共展示了View.OnLongClickListener方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AllAppsGridAdapter
import android.view.View; //导入方法依赖的package包/类
public AllAppsGridAdapter(Launcher launcher, AlphabeticalAppsList apps, View.OnClickListener
iconClickListener, View.OnLongClickListener iconLongClickListener) {
Resources res = launcher.getResources();
mLauncher = launcher;
mApps = apps;
mEmptySearchMessage = res.getString(R.string.all_apps_loading_message);
mGridSizer = new GridSpanSizer();
mGridLayoutMgr = new AppsGridLayoutManager(launcher);
mGridLayoutMgr.setSpanSizeLookup(mGridSizer);
mItemDecoration = new GridItemDecoration();
mLayoutInflater = LayoutInflater.from(launcher);
mIconClickListener = iconClickListener;
mIconLongClickListener = iconLongClickListener;
mSectionNamesMargin = res.getDimensionPixelSize(R.dimen.all_apps_grid_view_start_margin);
mSectionHeaderOffset = res.getDimensionPixelSize(R.dimen.all_apps_grid_section_y_offset);
mIsRtl = Utilities.isRtl(res);
mSectionTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mSectionTextPaint.setTextSize(res.getDimensionPixelSize(
R.dimen.all_apps_grid_section_text_size));
mSectionTextPaint.setColor(Utilities.getColorAccent(launcher));
}
示例2: UIBugsAdapter
import android.view.View; //导入方法依赖的package包/类
/**
* Constructor
*
* @param mObjects list of {@link ContainerUI} elements
* @param onClickListener the listener of the parent
* @param onLongClickListener the long click listener of the parent
*/
public UIBugsAdapter(@NonNull final ArrayList<ContainerUI> mObjects,
@NonNull final View.OnClickListener onClickListener,
@NonNull final View.OnLongClickListener onLongClickListener) {
this.mObjects = mObjects;
this.onClickListener = onClickListener;
this.onLongClickListener = onLongClickListener;
}
示例3: setOnLongClickListener
import android.view.View; //导入方法依赖的package包/类
public ViewHolder setOnLongClickListener(int viewId,
View.OnLongClickListener listener)
{
View view = getView(viewId);
view.setOnLongClickListener(listener);
return this;
}
示例4: AllAppsGridAdapter
import android.view.View; //导入方法依赖的package包/类
AllAppsGridAdapter(Launcher launcher, AlphabeticalAppsList apps, View.OnClickListener
iconClickListener, View.OnLongClickListener iconLongClickListener) {
Resources res = launcher.getResources();
mLauncher = launcher;
mApps = apps;
mEmptySearchMessage = res.getString(R.string.all_apps_loading_message);
mGridSizer = new GridSpanSizer();
mGridLayoutMgr = new AppsGridLayoutManager(launcher);
mGridLayoutMgr.setSpanSizeLookup(mGridSizer);
mLayoutInflater = LayoutInflater.from(launcher);
mIconClickListener = iconClickListener;
mIconLongClickListener = iconLongClickListener;
}
示例5: setOnLongClickListener
import android.view.View; //导入方法依赖的package包/类
public void setOnLongClickListener(int viewId, View.OnLongClickListener listener) {
View view = findView(viewId);
view.setOnLongClickListener(listener);
}
示例6: setOnLongClickListener
import android.view.View; //导入方法依赖的package包/类
public BaseRvViewHolder setOnLongClickListener(int viewId, View.OnLongClickListener listener) {
View view = getView(viewId);
view.setOnLongClickListener(listener);
return this;
}
示例7: setOnLongClickListener
import android.view.View; //导入方法依赖的package包/类
public ViewHolderHelper setOnLongClickListener(int viewId,
View.OnLongClickListener listener) {
View view = getView(viewId);
view.setOnLongClickListener(listener);
return this;
}
示例8: FileListAdapter
import android.view.View; //导入方法依赖的package包/类
public FileListAdapter(View.OnClickListener _listener_click, View.OnLongClickListener _listener_long) {
this._listener_click = _listener_click;
this._listener_long = _listener_long;
}
示例9: setOnLongClickListener
import android.view.View; //导入方法依赖的package包/类
public ViewHolder setOnLongClickListener(int viewId,
View.OnLongClickListener listener) {
View view = getView(viewId);
view.setOnLongClickListener(listener);
return this;
}
示例10: setOnLongClickListener
import android.view.View; //导入方法依赖的package包/类
@Override
public IViewHolder setOnLongClickListener(int viewId, View.OnLongClickListener listener) {
mMartianViewHolder.setOnLongClickListener(viewId, listener);
return this;
}
示例11: setOnLongClickListener
import android.view.View; //导入方法依赖的package包/类
public BaseRecyclerHolder setOnLongClickListener(int viewId, View.OnLongClickListener
listener) {
View view = getView(viewId);
view.setOnLongClickListener(listener);
return this;
}
示例12: setOnLongClickListener
import android.view.View; //导入方法依赖的package包/类
public ViewHolder setOnLongClickListener(@IdRes int viewId, View.OnLongClickListener listener) {
View view = getView(viewId);
view.setOnLongClickListener(listener);
return this;
}
示例13: CheckLongPressHelper
import android.view.View; //导入方法依赖的package包/类
public CheckLongPressHelper(View v, View.OnLongClickListener listener) {
mView = v;
mListener = listener;
}
示例14: setOnLongClickListener
import android.view.View; //导入方法依赖的package包/类
public void setOnLongClickListener(View.OnLongClickListener listener) {
this.longClickListener = listener;
}
示例15: setOnLongClickListener
import android.view.View; //导入方法依赖的package包/类
/**
* Sets the on long click listener of the view.
*
* @param viewId The view id.
* @param listener The on long click listener;
* @return The BaseViewHolder for chaining.
* Please use {@link #addOnLongClickListener(int)} (adapter.setOnItemChildLongClickListener(listener))}
*/
@Deprecated
public BaseViewHolder setOnLongClickListener(@IdRes int viewId, View.OnLongClickListener listener) {
View view = getView(viewId);
view.setOnLongClickListener(listener);
return this;
}