belongs to Maven artifact com.android.support:recyclerview-v7:28.0.0-alpha1
RecyclerView.SimpleOnItemTouchListener
public
static
class
RecyclerView.SimpleOnItemTouchListener
extends Object
implements
RecyclerView.OnItemTouchListener
java.lang.Object | |
↳ | android.support.v7.widget.RecyclerView.SimpleOnItemTouchListener |
An implementation of RecyclerView.OnItemTouchListener
that has empty method bodies
and default return values.
You may prefer to extend this class if you don't need to override all methods. Another benefit of using this class is future compatibility. As the interface may change, we'll always provide a default implementation on this class so that your code won't break when you update to a new version of the support library.
Summary
Public constructors | |
---|---|
RecyclerView.SimpleOnItemTouchListener()
|
Public methods | |
---|---|
boolean
|
onInterceptTouchEvent(RecyclerView rv, MotionEvent e)
Silently observe and/or take over touch events sent to the RecyclerView before they are handled by either the RecyclerView itself or its child views. |
void
|
onRequestDisallowInterceptTouchEvent(boolean disallowIntercept)
Called when a child of RecyclerView does not want RecyclerView and its ancestors to
intercept touch events with
|
void
|
onTouchEvent(RecyclerView rv, MotionEvent e)
Process a touch event as part of a gesture that was claimed by returning true from
a previous call to |
Inherited methods | |
---|---|
From
class
java.lang.Object
| |
From
interface
android.support.v7.widget.RecyclerView.OnItemTouchListener
|
Public constructors
RecyclerView.SimpleOnItemTouchListener
RecyclerView.SimpleOnItemTouchListener ()
Public methods
onInterceptTouchEvent
boolean onInterceptTouchEvent (RecyclerView rv, MotionEvent e)
Silently observe and/or take over touch events sent to the RecyclerView before they are handled by either the RecyclerView itself or its child views.
The onInterceptTouchEvent methods of each attached OnItemTouchListener will be run in the order in which each listener was added, before any other touch processing by the RecyclerView itself or child views occurs.
Parameters | |
---|---|
rv |
RecyclerView |
e |
MotionEvent : MotionEvent describing the touch event. All coordinates are in
the RecyclerView's coordinate system. |
Returns | |
---|---|
boolean |
true if this OnItemTouchListener wishes to begin intercepting touch events, false to continue with the current behavior and continue observing future events in the gesture. |
onRequestDisallowInterceptTouchEvent
void onRequestDisallowInterceptTouchEvent (boolean disallowIntercept)
Called when a child of RecyclerView does not want RecyclerView and its ancestors to
intercept touch events with
onInterceptTouchEvent(MotionEvent)
.
Parameters | |
---|---|
disallowIntercept |
boolean : True if the child does not want the parent to
intercept touch events. |
onTouchEvent
void onTouchEvent (RecyclerView rv, MotionEvent e)
Process a touch event as part of a gesture that was claimed by returning true from
a previous call to onInterceptTouchEvent(RecyclerView, MotionEvent)
.
Parameters | |
---|---|
rv |
RecyclerView |
e |
MotionEvent : MotionEvent describing the touch event. All coordinates are in
the RecyclerView's coordinate system.
|
Annotations
Interfaces
- ActionMenuView.OnMenuItemClickListener
- PopupMenu.OnDismissListener
- PopupMenu.OnMenuItemClickListener
- RecyclerView.ChildDrawingOrderCallback
- RecyclerView.ItemAnimator.ItemAnimatorFinishedListener
- RecyclerView.LayoutManager.LayoutPrefetchRegistry
- RecyclerView.OnChildAttachStateChangeListener
- RecyclerView.OnItemTouchListener
- RecyclerView.RecyclerListener
- RecyclerView.SmoothScroller.ScrollVectorProvider
- SearchView.OnCloseListener
- SearchView.OnQueryTextListener
- SearchView.OnSuggestionListener
- ShareActionProvider.OnShareTargetSelectedListener
- ThemedSpinnerAdapter
- Toolbar.OnMenuItemClickListener
Classes
- ActionMenuView
- ActionMenuView.LayoutParams
- AppCompatAutoCompleteTextView
- AppCompatButton
- AppCompatCheckBox
- AppCompatCheckedTextView
- AppCompatEditText
- AppCompatImageButton
- AppCompatImageView
- AppCompatMultiAutoCompleteTextView
- AppCompatRadioButton
- AppCompatRatingBar
- AppCompatSeekBar
- AppCompatSpinner
- AppCompatTextView
- CardView
- DefaultItemAnimator
- DividerItemDecoration
- GridLayout
- GridLayout.Alignment
- GridLayout.LayoutParams
- GridLayout.Spec
- GridLayoutManager
- GridLayoutManager.DefaultSpanSizeLookup
- GridLayoutManager.LayoutParams
- GridLayoutManager.SpanSizeLookup
- LinearLayoutCompat
- LinearLayoutCompat.LayoutParams
- LinearLayoutManager
- LinearLayoutManager.LayoutChunkResult
- LinearSmoothScroller
- LinearSnapHelper
- ListPopupWindow
- OrientationHelper
- PagerSnapHelper
- PopupMenu
- RecyclerView
- RecyclerView.Adapter
- RecyclerView.AdapterDataObserver
- RecyclerView.EdgeEffectFactory
- RecyclerView.ItemAnimator
- RecyclerView.ItemAnimator.ItemHolderInfo
- RecyclerView.ItemDecoration
- RecyclerView.LayoutManager
- RecyclerView.LayoutManager.Properties
- RecyclerView.LayoutParams
- RecyclerView.OnFlingListener
- RecyclerView.OnScrollListener
- RecyclerView.RecycledViewPool
- RecyclerView.Recycler
- RecyclerView.SimpleOnItemTouchListener
- RecyclerView.SmoothScroller
- RecyclerView.SmoothScroller.Action
- RecyclerView.State
- RecyclerView.ViewCacheExtension
- RecyclerView.ViewHolder
- RecyclerViewAccessibilityDelegate
- RecyclerViewAccessibilityDelegate.ItemDelegate
- SearchView
- ShareActionProvider
- SimpleItemAnimator
- SnapHelper
- StaggeredGridLayoutManager
- StaggeredGridLayoutManager.LayoutParams
- SwitchCompat
- ThemedSpinnerAdapter.Helper
- Toolbar
- Toolbar.LayoutParams
- Toolbar.SavedState
- TooltipCompat