当前位置: 首页>>代码示例>>Java>>正文


Java View.OnLongClickListener方法代码示例

本文整理汇总了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));
}
 
开发者ID:TeamBrainStorm,项目名称:SimpleUILauncher,代码行数:23,代码来源:AllAppsGridAdapter.java

示例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;
}
 
开发者ID:brandall76,项目名称:Saiy-PS,代码行数:15,代码来源:UIBugsAdapter.java

示例3: setOnLongClickListener

import android.view.View; //导入方法依赖的package包/类
public ViewHolder setOnLongClickListener(int viewId,
                                         View.OnLongClickListener listener)
{
    View view = getView(viewId);
    view.setOnLongClickListener(listener);
    return this;
}
 
开发者ID:pao11,项目名称:BaseAdapterRel,代码行数:8,代码来源:ViewHolder.java

示例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;
}
 
开发者ID:enricocid,项目名称:LaunchEnr,代码行数:14,代码来源:AllAppsGridAdapter.java

示例5: setOnLongClickListener

import android.view.View; //导入方法依赖的package包/类
public void setOnLongClickListener(int viewId, View.OnLongClickListener listener) {
    View view = findView(viewId);
    view.setOnLongClickListener(listener);
}
 
开发者ID:InnoFang,项目名称:FamilyBond,代码行数:5,代码来源:CustomPopupWindow.java

示例6: setOnLongClickListener

import android.view.View; //导入方法依赖的package包/类
public BaseRvViewHolder setOnLongClickListener(int viewId, View.OnLongClickListener listener) {
    View view = getView(viewId);
    view.setOnLongClickListener(listener);
    return this;
}
 
开发者ID:yangchong211,项目名称:YCBaseAdapter,代码行数:6,代码来源:BaseRvViewHolder.java

示例7: setOnLongClickListener

import android.view.View; //导入方法依赖的package包/类
public ViewHolderHelper setOnLongClickListener(int viewId,
                                               View.OnLongClickListener listener) {
    View view = getView(viewId);
    view.setOnLongClickListener(listener);
    return this;
}
 
开发者ID:wp521,项目名称:MyFire,代码行数:7,代码来源:ViewHolderHelper.java

示例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;
}
 
开发者ID:bonepeople,项目名称:SDCardCleaner,代码行数:5,代码来源:FileListAdapter.java

示例9: setOnLongClickListener

import android.view.View; //导入方法依赖的package包/类
public ViewHolder setOnLongClickListener(int viewId,
                                         View.OnLongClickListener listener) {
    View view = getView(viewId);
    view.setOnLongClickListener(listener);
    return this;
}
 
开发者ID:guzhigang001,项目名称:Bailan,代码行数:7,代码来源:ViewHolder.java

示例10: setOnLongClickListener

import android.view.View; //导入方法依赖的package包/类
@Override
public IViewHolder setOnLongClickListener(int viewId, View.OnLongClickListener listener) {
    mMartianViewHolder.setOnLongClickListener(viewId, listener);
    return this;
}
 
开发者ID:vsona,项目名称:RxJava2RetrofitDemo,代码行数:6,代码来源:MartianAdapterViewHolder.java

示例11: setOnLongClickListener

import android.view.View; //导入方法依赖的package包/类
public BaseRecyclerHolder setOnLongClickListener(int viewId, View.OnLongClickListener
        listener) {
    View view = getView(viewId);
    view.setOnLongClickListener(listener);
    return this;
}
 
开发者ID:zuoni1018,项目名称:CoordinatorLayoutExample-master,代码行数:7,代码来源:BaseRecyclerHolder.java

示例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;
}
 
开发者ID:fendoudebb,项目名称:PlayAndroid,代码行数:6,代码来源:ViewHolder.java

示例13: CheckLongPressHelper

import android.view.View; //导入方法依赖的package包/类
public CheckLongPressHelper(View v, View.OnLongClickListener listener) {
    mView = v;
    mListener = listener;
}
 
开发者ID:TeamBrainStorm,项目名称:SimpleUILauncher,代码行数:5,代码来源:CheckLongPressHelper.java

示例14: setOnLongClickListener

import android.view.View; //导入方法依赖的package包/类
public void setOnLongClickListener(View.OnLongClickListener listener) {
    this.longClickListener = listener;
}
 
开发者ID:CMPUT301F17T29,项目名称:HabitUp,代码行数:4,代码来源:EventListAdapter.java

示例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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:BaseViewHolder.java


注:本文中的android.view.View.OnLongClickListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。