Java Code Examples for android.widget.AdapterView#OnItemLongClickListener

The following examples show how to use android.widget.AdapterView#OnItemLongClickListener . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public void setOnAppListItemLongClickListener(AdapterView.OnItemLongClickListener listener) {
    mOnItemLongClickListener = listener;
    if (mUseGridMode) {
        if (mAppListGridView != null) {
            mAppListGridView.setOnItemLongClickListener(mOnItemLongClickListener);
        }
    } else {
        if (mAppListListView != null) {
            mAppListListView.setOnItemLongClickListener(mOnItemLongClickListener);
        }
    }
}
 
Example 2
Source Project: RemoteControlView   File: MyAdapter.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnItemLongClickListener(AdapterView.OnItemLongClickListener listener) {
    this.mOnItemLongClickListener = listener;
}
 
Example 3
Source Project: commonadapter   File: ViewHolderImpl.java    License: MIT License 4 votes vote down vote up
public void setOnItemLongClickListener(int viewId, AdapterView.OnItemLongClickListener listener) {
    AdapterView view = findViewById(viewId);
    view.setOnItemLongClickListener(listener);
}
 
Example 4
@NonNull
ViewFinder setOnItemLongClickListener(@IdRes int ID, AdapterView.OnItemLongClickListener listener);
 
Example 5
public void setLongClickListener(AdapterView.OnItemLongClickListener listener) {
    mConvListView.setOnItemLongClickListener(listener);
}
 
Example 6
Source Project: MVPro   File: EventHelper.java    License: Apache License 2.0 4 votes vote down vote up
public static void itemLongClick(AdapterView.OnItemLongClickListener li, AdapterView ... views) {
    if(views == null || views.length == 0) return;
    for(AdapterView v : views) v.setOnItemLongClickListener(li);
}
 
Example 7
Source Project: commonadapter   File: RecyclerViewHolder.java    License: MIT License 4 votes vote down vote up
public RecyclerViewHolder setOnItemLongClickListener(int viewId, AdapterView.OnItemLongClickListener listener) {
    mHolderImpl.setOnItemLongClickListener(viewId, listener);
    return this;
}
 
Example 8
Source Project: moVirt   File: BaseListFragment.java    License: Apache License 2.0 4 votes vote down vote up
protected AdapterView.OnItemLongClickListener getOnItemLongClickListener() {
    return null;
}
 
Example 9
Source Project: ExRecyclerView   File: ExRecyclerView.java    License: Apache License 2.0 4 votes vote down vote up
public void setOnItemLongClickListener(AdapterView.OnItemLongClickListener listener) {
    mOnItemLongClickListener = listener;
}
 
Example 10
public void setOnItemLongClickListener(AdapterView.OnItemLongClickListener onItemLongClickListener) {
    mOnItemLongClickListener = onItemLongClickListener;
}
 
Example 11
@Override
public void setOnItemLongClickListener(AdapterView.OnItemLongClickListener listener)
{
	mOnItemLongClicked = listener;
}
 
Example 12
Source Project: MeiZiNews   File: EventHelper.java    License: MIT License 4 votes vote down vote up
public static void itemLongClick(IPresenter li, AdapterView ... views) {
    if(!(li instanceof AdapterView.OnItemLongClickListener)) return;
    itemLongClick((AdapterView.OnItemLongClickListener) li, views);
}
 
Example 13
Source Project: MeiZiNews   File: EventHelper.java    License: MIT License 4 votes vote down vote up
public static void itemLongClick(AdapterView.OnItemLongClickListener li, AdapterView ... views) {
    if(views == null || views.length == 0) return;
    for(AdapterView v : views) v.setOnItemLongClickListener(li);
}
 
Example 14
Source Project: anvil   File: DSL.java    License: MIT License 4 votes vote down vote up
public static Void onItemLongClick(AdapterView.OnItemLongClickListener arg) {
  return BaseDSL.attr("onItemLongClick", arg);
}
 
Example 15
public ItemViewHelper setOnItemLongClickListener(int viewId, AdapterView.OnItemLongClickListener listener) {
    AdapterView view = this.getView(viewId);
    view.setOnItemLongClickListener(listener);
    return this;
}
 
Example 16
Source Project: imsdk-android   File: BaseViewHolder.java    License: MIT License 2 votes vote down vote up
/**
 * Sets the listview or gridview's item long click listener of the view
 *
 * @param viewId   The view id.
 * @param listener The item long click listener;
 * @return The BaseViewHolder for chaining.
 */
public BaseViewHolder setOnItemLongClickListener(@IdRes int viewId, AdapterView.OnItemLongClickListener listener) {
    AdapterView view = getView(viewId);
    view.setOnItemLongClickListener(listener);
    return this;
}
 
Example 17
Source Project: demo4Fish   File: BaseViewHolder.java    License: MIT License 2 votes vote down vote up
/**
 * Sets the listview or gridview's item long click listener of the view
 *
 * @param viewId   The view id.
 * @param listener The item long click listener;
 * @return The BaseViewHolder for chaining.
 */
public BaseViewHolder setOnItemLongClickListener(int viewId, AdapterView.OnItemLongClickListener listener) {
    AdapterView view = getView(viewId);
    view.setOnItemLongClickListener(listener);
    return this;
}
 
Example 18
Source Project: GoogleVR   File: BaseViewHolder.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Sets the listview or gridview's item long click listener of the view
 *
 * @param viewId   The view id.
 * @param listener The item long click listener;
 * @return The BaseViewHolder for chaining.
 */
public BaseViewHolder setOnItemLongClickListener(int viewId, AdapterView.OnItemLongClickListener listener) {
    AdapterView view = getView(viewId);
    view.setOnItemLongClickListener(listener);
    return this;
}
 
Example 19
Source Project: basic-adapter   File: BaseViewHolder.java    License: MIT License 2 votes vote down vote up
/**
 * Sets the listview or gridview's item long click listener of the view
 *
 * @param viewId   The view id.
 * @param listener The item long click listener;
 * @return The BaseViewHolder for chaining.
 */
public BaseViewHolder setOnItemLongClickListener(int viewId, AdapterView.OnItemLongClickListener listener) {
    AdapterView view = getView(viewId);
    view.setOnItemLongClickListener(listener);
    return this;
}
 
Example 20
Source Project: BaseProject   File: BaseViewHolder.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Sets the listview or gridview's item long click listener of the view
 *
 * @param viewId   The view id.
 * @param listener The item long click listener;
 * @return The BaseViewHolder for chaining.
 */
public BaseViewHolder setOnItemLongClickListener(@IdRes int viewId, AdapterView.OnItemLongClickListener listener) {
    AdapterView view = getView(viewId);
    view.setOnItemLongClickListener(listener);
    return this;
}