public abstract class SimpleClickListener
extends java.lang.Object
This can be useful for applications that wish to implement various forms of click and longclick and childView click manipulation of item views within the RecyclerView. SimpleClickListener may intercept a touch interaction already in progress even if the SimpleClickListener is already handling that gesture stream itself for the purposes of scrolling.
RecyclerView.OnItemTouchListener| Modifier and Type | Field and Description |
|---|---|
protected BaseQuickAdapter |
baseQuickAdapter |
static java.lang.String |
TAG |
| Constructor and Description |
|---|
SimpleClickListener() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
inRangeOfView(android.view.View view,
android.view.MotionEvent ev) |
boolean |
onInterceptTouchEvent(RecyclerView rv,
android.view.MotionEvent e) |
abstract void |
onItemChildClick(BaseQuickAdapter adapter,
android.view.View view,
int position)
callback method to be invoked when an itemchild in this view has been click
|
abstract void |
onItemChildLongClick(BaseQuickAdapter adapter,
android.view.View view,
int position)
callback method to be invoked when an item in this view has been
click and held
|
abstract void |
onItemClick(BaseQuickAdapter adapter,
android.view.View view,
int position)
Callback method to be invoked when an item in this AdapterView has
been clicked.
|
abstract void |
onItemLongClick(BaseQuickAdapter adapter,
android.view.View view,
int position)
callback method to be invoked when an item in this view has been
click and held
|
void |
onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) |
void |
onTouchEvent(RecyclerView rv,
android.view.MotionEvent e) |
public static java.lang.String TAG
protected BaseQuickAdapter baseQuickAdapter
public boolean onInterceptTouchEvent(RecyclerView rv,
android.view.MotionEvent e)
public void onTouchEvent(RecyclerView rv,
android.view.MotionEvent e)
public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept)
public abstract void onItemClick(BaseQuickAdapter adapter, android.view.View view, int position)
adapter - view - The view within the AdapterView that was clicked (this
will be a view provided by the adapter)position - The position of the view in the adapter.public abstract void onItemLongClick(BaseQuickAdapter adapter, android.view.View view, int position)
adapter - view - The view whihin the AbsListView that was clickedposition - The position of the view int the adapterpublic abstract void onItemChildClick(BaseQuickAdapter adapter, android.view.View view, int position)
adapter - view - The view whihin the AbsListView that was clickedposition - The position of the view int the adapterpublic abstract void onItemChildLongClick(BaseQuickAdapter adapter, android.view.View view, int position)
adapter - view - The view whihin the AbsListView that was clickedposition - The position of the view int the adapterpublic boolean inRangeOfView(android.view.View view,
android.view.MotionEvent ev)