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.
| 限定符和类型 | 字段和说明 |
|---|---|
protected BaseQuickAdapter |
baseQuickAdapter |
static java.lang.String |
TAG |
| 构造器和说明 |
|---|
SimpleClickListener() |
| 限定符和类型 | 方法和说明 |
|---|---|
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) |
abstract void |
onItemChildLongClick(BaseQuickAdapter adapter,
android.view.View view,
int position) |
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)
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)
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)
public abstract void onItemChildLongClick(BaseQuickAdapter adapter, android.view.View view, int position)
public boolean inRangeOfView(android.view.View view,
android.view.MotionEvent ev)