public class RadListView extends RecyclerView
Modifier and Type | Class and Description |
---|---|
static interface |
RadListView.IsEmptyChangedListener
Interface definition for a callback to be invoked when listview's isEmpty state gets changed.
|
static interface |
RadListView.ItemClickListener
Interface definition for a callback to be invoked when an item is clicked or long-clicked.
|
RecyclerView.Adapter<VH extends RecyclerView.ViewHolder>, RecyclerView.AdapterDataObserver, RecyclerView.ChildDrawingOrderCallback, RecyclerView.ItemAnimator, RecyclerView.ItemDecoration, RecyclerView.LayoutManager, RecyclerView.LayoutParams, RecyclerView.OnChildAttachStateChangeListener, RecyclerView.OnItemTouchListener, RecyclerView.OnScrollListener, RecyclerView.RecycledViewPool, RecyclerView.Recycler, RecyclerView.RecyclerListener, RecyclerView.SavedState, RecyclerView.SimpleOnItemTouchListener, RecyclerView.SmoothScroller, RecyclerView.State, RecyclerView.ViewCacheExtension, RecyclerView.ViewHolder
ViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListener
View.AccessibilityDelegate, View.BaseSavedState, View.DragShadowBuilder, View.MeasureSpec, View.OnApplyWindowInsetsListener, View.OnAttachStateChangeListener, View.OnClickListener, View.OnContextClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnScrollChangeListener, View.OnSystemUiVisibilityChangeListener, View.OnTouchListener
HORIZONTAL, INVALID_TYPE, NO_ID, NO_POSITION, SCROLL_STATE_DRAGGING, SCROLL_STATE_IDLE, SCROLL_STATE_SETTLING, TOUCH_SLOP_DEFAULT, TOUCH_SLOP_PAGING, VERTICAL
FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VISIBLE, X, Y, Z
Constructor and Description |
---|
RadListView(Context context)
Creates an instance of the
RadListView class. |
RadListView(Context context,
AttributeSet attrs)
Creates an instance of the
RadListView class. |
RadListView(Context context,
AttributeSet attrs,
int defStyle)
Creates an instance of the
RadListView class. |
Modifier and Type | Method and Description |
---|---|
void |
addBehavior(ListViewBehavior behavior)
Adds a
ListViewBehavior instance to this instance. |
void |
addIsEmptyChangedListener(RadListView.IsEmptyChangedListener listener)
Adds a listener to be called when the items count changes to or from `0`.
|
void |
addItemClickListener(RadListView.ItemClickListener listener)
Adds a listener to be called when an item is clicked.
|
void |
clearBehaviors()
Clears all
ListViewBehavior that have been added to this instance. |
RecyclerView.Adapter |
getAdapter() |
int |
getChildAdapterPosition(View child) |
View |
getEmptyContent() |
View |
getFooterView()
Gets the
View that is displayed on the bottom of the list of the
items that are provided by the ListViewAdapter . |
ListViewGestureListener |
getGestureListener()
Gets the current
ListViewGestureListener that handles
the user gestures and notifies the currently added behaviors. |
View |
getHeaderView()
Gets the
View that is displayed in the beginning of the list of the
items that are provided by the ListViewAdapter . |
boolean |
isEmptyContentEnabled() |
boolean |
onInterceptTouchEvent(MotionEvent e) |
void |
onScrolled(int dx,
int dy) |
boolean |
onTouchEvent(MotionEvent e) |
void |
removeBehavior(ListViewBehavior behavior)
Removes a
ListViewBehavior instance from this instance. |
void |
removeIsEmptyChangedListener(RadListView.IsEmptyChangedListener listener)
Removes a listener that is called when the items count changes to or from `0`.
|
void |
removeItemClickListener(RadListView.ItemClickListener listener)
Removes a listener that is called when an item is clicked.
|
void |
scrollToEnd()
Convenience method to scroll to the end of the list.
|
void |
scrollToPosition(int position) |
void |
scrollToPosition(int position,
int snapMode)
Scrolls the list to the given position by snapping the target item
according to the specified snap mode.
|
void |
scrollToStart()
Convenience method to scroll to the beginning of the list.
|
void |
setAdapter(RecyclerView.Adapter adapter) |
void |
setEmptyContent(View emptyContent) |
void |
setEmptyContentEnabled(boolean emptyContentEnabled) |
void |
setFooterView(View footerView)
Sets a
View that will be displayed on the bottom of the list of the
items that are provided by the ListViewAdapter . |
void |
setGestureListener(ListViewGestureListener gestureListener)
Sets a new
ListViewGestureListener that will be responsible
for handling of the user gestures and notifying the currently added behaviors. |
void |
setHeaderView(View headerView)
Sets a
View that will be displayed in the beginning of the list of the
items that are provided by the ListViewAdapter . |
void |
setItemAnimator(RecyclerView.ItemAnimator animator) |
void |
setLayoutManager(RecyclerView.LayoutManager layout) |
void |
smoothScrollToPosition(int position,
int snapMode)
Smoothly scrolls to the desired position by snapping the target item at the specified
position in the viewport of the list.
|
void |
swapAdapter(RecyclerView.Adapter adapter,
boolean removeAndRecycleExistingViews) |
addFocusables, addItemDecoration, addItemDecoration, addOnChildAttachStateChangeListener, addOnItemTouchListener, addOnScrollListener, clearOnChildAttachStateChangeListeners, clearOnScrollListeners, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPreScroll, dispatchNestedScroll, draw, drawChild, findChildViewUnder, findContainingItemView, findContainingViewHolder, findViewHolderForAdapterPosition, findViewHolderForItemId, findViewHolderForLayoutPosition, findViewHolderForPosition, fling, focusSearch, generateLayoutParams, getBaseline, getChildItemId, getChildLayoutPosition, getChildPosition, getChildViewHolder, getCompatAccessibilityDelegate, getItemAnimator, getLayoutManager, getMaxFlingVelocity, getMinFlingVelocity, getRecycledViewPool, getScrollState, hasFixedSize, hasNestedScrollingParent, hasPendingAdapterUpdates, invalidateItemDecorations, isAnimating, isAttachedToWindow, isComputingLayout, isLayoutFrozen, isNestedScrollingEnabled, offsetChildrenHorizontal, offsetChildrenVertical, onChildAttachedToWindow, onChildDetachedFromWindow, onDraw, onGenericMotionEvent, onScrollStateChanged, removeItemDecoration, removeOnChildAttachStateChangeListener, removeOnItemTouchListener, removeOnScrollListener, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestLayout, scrollBy, scrollTo, sendAccessibilityEventUnchecked, setAccessibilityDelegateCompat, setChildDrawingOrderCallback, setClipToPadding, setHasFixedSize, setItemViewCacheSize, setLayoutFrozen, setNestedScrollingEnabled, setOnScrollListener, setRecycledViewPool, setRecyclerListener, setScrollingTouchSlop, setViewCacheExtension, smoothScrollBy, smoothScrollToPosition, startNestedScroll, stopNestedScroll, stopScroll
addChildrenForAccessibility, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchProvideStructure, dispatchSetActivated, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, gatherTransparentRegion, getAccessibilityClassName, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onInterceptHoverEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, shouldDelayChildPressedState, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedPrePerformAccessibilityAction, dispatchPopulateAccessibilityEvent, drawableHotspotChanged, findViewById, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTrackballEvent, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, sendAccessibilityEvent, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows
public RadListView(Context context)
RadListView
class.context
- the context to be usedpublic RadListView(Context context, AttributeSet attrs)
RadListView
class.context
- the context to be usedattrs
- the attributespublic RadListView(Context context, AttributeSet attrs, int defStyle)
RadListView
class.context
- the context to be usedattrs
- the attributesdefStyle
- the default stylepublic void addItemClickListener(RadListView.ItemClickListener listener)
listener
- the new listener.public void removeItemClickListener(RadListView.ItemClickListener listener)
listener
- the listener to remove.public void addIsEmptyChangedListener(RadListView.IsEmptyChangedListener listener)
listener
- the new listener.public void removeIsEmptyChangedListener(RadListView.IsEmptyChangedListener listener)
listener
- the listener to remove.public void scrollToStart()
scrollToEnd()
,
scrollToPosition(int)
public void scrollToEnd()
scrollToStart()
,
scrollToPosition(int)
public void addBehavior(ListViewBehavior behavior)
ListViewBehavior
instance to this instance.
Note that, you can add only one instance of a certain behavior. For example, if you have
already added a SelectionBehavior
you can't add another
SelectionBehavior
before removing the old one.behavior
- the behavior that is added.()
,
clearBehaviors()
public void removeBehavior(ListViewBehavior behavior)
ListViewBehavior
instance from this instance.behavior
- the behavior that is removed.addBehavior(ListViewBehavior)
,
clearBehaviors()
public void clearBehaviors()
ListViewBehavior
that have been added to this instance.public void setGestureListener(ListViewGestureListener gestureListener)
ListViewGestureListener
that will be responsible
for handling of the user gestures and notifying the currently added behaviors.getGestureListener()
public ListViewGestureListener getGestureListener()
ListViewGestureListener
that handles
the user gestures and notifies the currently added behaviors.public void setEmptyContent(View emptyContent)
public View getEmptyContent()
public void setEmptyContentEnabled(boolean emptyContentEnabled)
public boolean isEmptyContentEnabled()
public void setHeaderView(View headerView)
View
that will be displayed in the beginning of the list of the
items that are provided by the ListViewAdapter
.
Please note that you may not be able to change the header once it is set.
Instead, you can get the view with getHeaderView()
and change its appearance if necessary.getHeaderView()
public View getHeaderView()
View
that is displayed in the beginning of the list of the
items that are provided by the ListViewAdapter
.setHeaderView(android.view.View)
public void setFooterView(View footerView)
View
that will be displayed on the bottom of the list of the
items that are provided by the ListViewAdapter
.
Please note that you may not be able to change the footer once it is set.
Instead, you can get the view with getFooterView()
and change its appearance if necessary.getFooterView()
public View getFooterView()
View
that is displayed on the bottom of the list of the
items that are provided by the ListViewAdapter
.setFooterView(android.view.View)
public void setLayoutManager(RecyclerView.LayoutManager layout)
setLayoutManager
in class RecyclerView
public void scrollToPosition(int position)
scrollToPosition
in class RecyclerView
public void scrollToPosition(int position, int snapMode)
position
- the position to scroll to.snapMode
- the snap mode for the target item.public void smoothScrollToPosition(int position, int snapMode)
position
- the index of the data item from the data source to smoothly scroll to.snapMode
- the snap mode which determines whether the item will be centered, snapped at the top edge
of the viewport or at the bottom edge of the viewport.public int getChildAdapterPosition(View child)
getChildAdapterPosition
in class RecyclerView
public boolean onTouchEvent(MotionEvent e)
onTouchEvent
in class RecyclerView
public boolean onInterceptTouchEvent(MotionEvent e)
onInterceptTouchEvent
in class RecyclerView
public void setAdapter(RecyclerView.Adapter adapter)
setAdapter
in class RecyclerView
public RecyclerView.Adapter getAdapter()
getAdapter
in class RecyclerView
public void swapAdapter(RecyclerView.Adapter adapter, boolean removeAndRecycleExistingViews)
swapAdapter
in class RecyclerView
public void setItemAnimator(RecyclerView.ItemAnimator animator)
setItemAnimator
in class RecyclerView
public void onScrolled(int dx, int dy)
onScrolled
in class RecyclerView