DpadRecyclerView

open class DpadRecyclerView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.attr.dpadRecyclerViewStyle) : RecyclerView

A RecyclerView that scrolls to items on DPAD key events.

Items are aligned based on the following configurations:

This DpadRecyclerView will only scroll automatically when it has focus and receives DPAD key events. To scroll manually to any given item, check setSelectedPosition, setSelectedPositionSmooth and other related methods.

When using wrap_content for the main scrolling direction, DpadRecyclerView will still measure itself to match its parent's size, but will layout all items at once without any recycling.

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.attr.dpadRecyclerViewStyle)

Types

Link copied to clipboard

Listener for intercepting key dispatch events.

Link copied to clipboard

Listener for receiving notifications of a completed layout pass by the LayoutManager of this RecyclerView

Link copied to clipboard

Listener for intercepting generic motion dispatch events.

Link copied to clipboard

Listener for intercepting touch dispatch events

Link copied to clipboard

Listener for intercepting unhandled key events.

Link copied to clipboard

Defines behavior of duration and interpolator for smoothScrollBy.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var alpha: Float
Link copied to clipboard
open var animation: Animation?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val autofillHints: Array<out String?>??
Link copied to clipboard
Link copied to clipboard
open val autofillType: Int
Link copied to clipboard
Link copied to clipboard
open var background: Drawable?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val baseline: Int
Link copied to clipboard
var bottom: Int
Link copied to clipboard
Link copied to clipboard
open val childCount: Int
Link copied to clipboard
open var clipBounds: Rect?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val display: Display?
Link copied to clipboard
Link copied to clipboard
open val drawingCache: Bitmap?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val drawingTime: Long
Link copied to clipboard
open var elevation: Float
Link copied to clipboard
open val explicitStyle: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var focusable: Int
Link copied to clipboard
open val focusedChild: View?
Link copied to clipboard
open var foreground: Drawable?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val handler: Handler?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val height: Int
Link copied to clipboard
Link copied to clipboard
open var id: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isDirty: Boolean
Link copied to clipboard
Link copied to clipboard
open var isEnabled: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isFocused: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var isHovered: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isLaidOut: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val isLayoutRequested: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isOpaque: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var isPressed: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val isShown: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val isTextAlignmentResolved: Boolean
Link copied to clipboard
open override val isTextDirectionResolved: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var labelFor: Int
Link copied to clipboard
open val layerType: Int
Link copied to clipboard
Link copied to clipboard
open override var layoutDirection: Int
Link copied to clipboard
Link copied to clipboard
open var layoutMode: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var left: Int
Link copied to clipboard
open val matrix: Matrix?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var minimumHeight: Int
Link copied to clipboard
open var minimumWidth: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var nextFocusUpId: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val paddingBottom: Int
Link copied to clipboard
open val paddingEnd: Int
Link copied to clipboard
open val paddingLeft: Int
Link copied to clipboard
open val paddingRight: Int
Link copied to clipboard
open val paddingStart: Int
Link copied to clipboard
open val paddingTop: Int
Link copied to clipboard
override val parent: ViewParent?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var pivotX: Float
Link copied to clipboard
open var pivotY: Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val resources: Resources?
Link copied to clipboard
Link copied to clipboard
var right: Int
Link copied to clipboard
Link copied to clipboard
open val rootView: View?
Link copied to clipboard
Link copied to clipboard
open var rotation: Float
Link copied to clipboard
open var rotationX: Float
Link copied to clipboard
open var rotationY: Float
Link copied to clipboard
open var scaleX: Float
Link copied to clipboard
open var scaleY: Float
Link copied to clipboard
Link copied to clipboard
open var scrollBarSize: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var scrollState: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val solidColor: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var tag: Any?
Link copied to clipboard
open override var textAlignment: Int
Link copied to clipboard
open override var textDirection: Int
Link copied to clipboard
Link copied to clipboard
var top: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var visibility: Int
Link copied to clipboard
val width: Int
Link copied to clipboard
open val windowId: WindowId?
Link copied to clipboard
Link copied to clipboard
open val windowToken: IBinder?
Link copied to clipboard
Link copied to clipboard
open var x: Float
Link copied to clipboard
open var y: Float
Link copied to clipboard
open var z: Float

Functions

Link copied to clipboard
open fun addChildrenForAccessibility(outChildren: ArrayList<View?>?)
Link copied to clipboard
open fun addExtraDataToAccessibilityNodeInfo(info: AccessibilityNodeInfo, extraDataKey: String, arguments: Bundle?)
Link copied to clipboard
open fun addFocusables(views: ArrayList<View?>?, direction: Int)
open fun addFocusables(views: ArrayList<View?>?, direction: Int, focusableMode: Int)
Link copied to clipboard
open fun addKeyboardNavigationClusters(views: Collection<View?>, direction: Int)
Link copied to clipboard

Registers a callback to be invoked when an item of this DpadRecyclerView has been laid out.

Link copied to clipboard

Registers a callback to be invoked when this RecyclerView loses focus

Link copied to clipboard

Registers a callback to be invoked when this RecyclerView completes a layout pass.

Link copied to clipboard
Link copied to clipboard

Registers a callback to be invoked when an item has been focused

Link copied to clipboard

Registers a callback to be invoked when an item has been selected

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun addTouchables(views: ArrayList<View?>?)
Link copied to clipboard
open fun addView(child: View?)
open fun addView(child: View?, index: Int)
open fun addView(child: View?, index: Int, params: ViewGroup.LayoutParams?)
open fun addView(child: View?, width: Int, height: Int)
open fun addView(child: View?, params: ViewGroup.LayoutParams?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun autofill(values: SparseArray<AutofillValue?>)
open fun autofill(value: AutofillValue?)
Link copied to clipboard
open fun bringChildToFront(child: View?)
Link copied to clipboard
open fun bringToFront()
Link copied to clipboard
open fun buildDrawingCache(autoScale: Boolean)
Link copied to clipboard
open fun buildLayer()
Link copied to clipboard
open fun callOnClick(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun cancelLongPress()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun canScrollHorizontally(direction: Int): Boolean
Link copied to clipboard
open fun canScrollVertically(direction: Int): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun childHasTransientStateChanged(child: View, childHasTransientState: Boolean)
Link copied to clipboard
open fun clearAnimation()
Link copied to clipboard
open fun clearChildFocus(child: View?)
Link copied to clipboard
Link copied to clipboard
open fun clearFocus()
Link copied to clipboard

Clears all listeners added by addOnChildLaidOutListener

Link copied to clipboard

Clears all existing listeners added by addOnFocusLostListener

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Clears all existing listeners added by addOnViewFocusedListener

Link copied to clipboard

Clears all existing listeners added by addOnViewHolderSelectedListener

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun computeScroll()
Link copied to clipboard
open fun computeSystemWindowInsets(in: WindowInsets?, outLocalInsets: Rect?): WindowInsets?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun dispatchCreateViewTranslationRequest(viewIds: Map<AutofillId?, LongArray?>, supportedFormats: IntArray, capability: TranslationCapability?, requests: List<ViewTranslationRequest?>)
Link copied to clipboard
open fun dispatchDisplayHint(hint: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override fun dispatchKeyEvent(event: KeyEvent?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun dispatchNestedFling(velocityX: Float, velocityY: Float, consumed: Boolean): Boolean
Link copied to clipboard
open fun dispatchNestedPreFling(velocityX: Float, velocityY: Float): Boolean
Link copied to clipboard
open fun dispatchNestedPreScroll(dx: Int, dy: Int, consumed: IntArray?, offsetInWindow: IntArray?): Boolean
open fun dispatchNestedPreScroll(dx: Int, dy: Int, consumed: IntArray?, offsetInWindow: IntArray?, type: Int): Boolean
Link copied to clipboard
open fun dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, offsetInWindow: IntArray?): Boolean
open fun dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, offsetInWindow: IntArray?, type: Int): Boolean
fun dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, offsetInWindow: IntArray?, type: Int, @NonNull consumed: IntArray)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun dispatchScrollCaptureSearch(localVisibleRect: Rect, windowOffset: Point, targets: Consumer<ScrollCaptureTarget?>)
Link copied to clipboard
open fun dispatchSetActivated(activated: Boolean)
Link copied to clipboard
open fun dispatchSetSelected(selected: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun dispatchTouchEvent(event: MotionEvent): Boolean
Link copied to clipboard
Link copied to clipboard
open fun dispatchUnhandledMove(focused: View?, direction: Int): Boolean
Link copied to clipboard
Link copied to clipboard
open fun dispatchWindowVisibilityChanged(visibility: Int)
Link copied to clipboard
open fun draw(@NonNull c: Canvas)
Link copied to clipboard
Link copied to clipboard
open fun drawChild(@NonNull canvas: Canvas, child: View?, drawingTime: Long): Boolean
Link copied to clipboard

Enables fading out the max edge to transparent.

Link copied to clipboard

Enables fading out the min edge to transparent.

Link copied to clipboard
open fun endViewTransition(view: View?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun findFocus(): View?
Link copied to clipboard
fun <T : View?> findViewById(id: Int): T?
Link copied to clipboard
open fun findViewsWithText(outViews: ArrayList<View?>?, text: CharSequence?, flags: Int)
Link copied to clipboard
fun <T : View?> findViewWithTag(tag: Any?): T?
Link copied to clipboard
open fun fling(velocityX: Int, velocityY: Int): Boolean
Link copied to clipboard
Link copied to clipboard
open fun focusSearch(focused: View?, direction: Int): View?
override fun focusSearch(direction: Int): View?
Link copied to clipboard
open fun forceHasOverlappingRendering(hasOverlappingRendering: Boolean)
Link copied to clipboard
open fun forceLayout()
Link copied to clipboard
Link copied to clipboard
open fun generateDisplayHash(hashAlgorithm: String, bounds: Rect?, executor: Executor, callback: DisplayHashResultCallback)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getChildAt(index: Int): View?
Link copied to clipboard
fun getChildDrawingOrder(drawingPosition: Int): Int
Link copied to clipboard
open fun getChildItemId(@NonNull child: View): Long
Link copied to clipboard
Link copied to clipboard
open fun getChildPosition(@NonNull child: View): Int
Link copied to clipboard
Link copied to clipboard
open fun getChildVisibleRect(child: View?, r: Rect?, offset: Point?): Boolean
Link copied to clipboard
Link copied to clipboard
open fun getDecoratedBoundsWithMargins(@NonNull view: View, @NonNull outBounds: Rect)
Link copied to clipboard
open fun getDrawingRect(outRect: Rect?)
Link copied to clipboard
open fun getFocusables(direction: Int): ArrayList<View?>?
Link copied to clipboard
open fun getFocusedRect(r: Rect?)
Link copied to clipboard
Link copied to clipboard
open fun getGlobalVisibleRect(r: Rect?, globalOffset: Point?): Boolean
Link copied to clipboard
open fun getHitRect(outRect: Rect?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getLocationInSurface(location: IntArray)
Link copied to clipboard
open fun getLocationInWindow(outLocation: IntArray?)
Link copied to clipboard
open fun getLocationOnScreen(outLocation: IntArray?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getTextAlignment(): Int
Link copied to clipboard
open fun getTextDirection(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun hasFixedSize(): Boolean
Link copied to clipboard
open fun hasFocus(): Boolean
Link copied to clipboard
open fun hasFocusable(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun indexOfChild(child: View?): Int
Link copied to clipboard
open fun invalidate()
open fun invalidate(dirty: Rect?)
open fun invalidate(l: Int, t: Int, r: Int, b: Int)
Link copied to clipboard
fun invalidateChild(child: View?, dirty: Rect?)
Link copied to clipboard
open fun invalidateChildInParent(location: IntArray?, dirty: Rect?): ViewParent?
Link copied to clipboard
open fun invalidateDrawable(drawable: Drawable)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Deprecated: use isFocusSearchEnabled instead

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns if views are laid out from the opposite direction of the layout.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isVisibleToUserForAutofill(virtualId: Int): Boolean
Link copied to clipboard
Link copied to clipboard
open fun keyboardNavigationClusterSearch(currentCluster: View?, direction: Int): View?
Link copied to clipboard
fun layout(l: Int, t: Int, r: Int, b: Int)
Link copied to clipboard
fun measure(widthMeasureSpec: Int, heightMeasureSpec: Int)
Link copied to clipboard
open fun nestedScrollBy(x: Int, y: Int)
Link copied to clipboard
open fun notifySubtreeAccessibilityStateChanged(child: View, source: View, changeType: Int)
Link copied to clipboard
Link copied to clipboard
open fun offsetChildrenVertical(@Px dy: Int)
Link copied to clipboard
fun offsetDescendantRectToMyCoords(descendant: View?, rect: Rect?)
Link copied to clipboard
open fun offsetLeftAndRight(offset: Int)
Link copied to clipboard
fun offsetRectIntoDescendantCoords(descendant: View?, rect: Rect?)
Link copied to clipboard
open fun offsetTopAndBottom(offset: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onCreateViewTranslationRequest(supportedFormats: IntArray, requestsCollector: Consumer<ViewTranslationRequest?>)
Link copied to clipboard
open fun onCreateVirtualViewTranslationRequests(virtualIds: LongArray, supportedFormats: IntArray, requestsCollector: Consumer<ViewTranslationRequest?>)
Link copied to clipboard
open fun onDescendantInvalidated(child: View, target: View)
Link copied to clipboard
open fun onDragEvent(event: DragEvent?): Boolean
Link copied to clipboard
open fun onDraw(@NonNull c: Canvas)
Link copied to clipboard
open fun onDrawForeground(canvas: Canvas)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onHoverChanged(hovered: Boolean)
Link copied to clipboard
open fun onHoverEvent(event: MotionEvent?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean
Link copied to clipboard
open fun onKeyLongPress(keyCode: Int, event: KeyEvent?): Boolean
Link copied to clipboard
open fun onKeyMultiple(keyCode: Int, repeatCount: Int, event: KeyEvent?): Boolean
Link copied to clipboard
open fun onKeyPreIme(keyCode: Int, event: KeyEvent?): Boolean
Link copied to clipboard
open fun onKeyShortcut(keyCode: Int, event: KeyEvent?): Boolean
Link copied to clipboard
open fun onKeyUp(keyCode: Int, event: KeyEvent?): Boolean
Link copied to clipboard
open fun onNestedFling(target: View, velocityX: Float, velocityY: Float, consumed: Boolean): Boolean
Link copied to clipboard
open fun onNestedPreFling(target: View, velocityX: Float, velocityY: Float): Boolean
Link copied to clipboard
open fun onNestedPrePerformAccessibilityAction(target: View, action: Int, args: Bundle?): Boolean
Link copied to clipboard
open fun onNestedPreScroll(target: View, dx: Int, dy: Int, consumed: IntArray)
Link copied to clipboard
open fun onNestedScroll(target: View, dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int)
Link copied to clipboard
open fun onNestedScrollAccepted(child: View, target: View, axes: Int)
Link copied to clipboard
open fun onPointerCaptureChange(hasCapture: Boolean)
Link copied to clipboard
open fun onProvideAutofillStructure(structure: ViewStructure?, flags: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onProvideStructure(structure: ViewStructure?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onResolvePointerIcon(event: MotionEvent?, pointerIndex: Int): PointerIcon?
Link copied to clipboard
override fun onRtlPropertiesChanged(layoutDirection: Int)
Link copied to clipboard
open fun onScreenStateChanged(screenState: Int)
Link copied to clipboard
open fun onScrollCaptureSearch(localVisibleRect: Rect, windowOffset: Point, targets: Consumer<ScrollCaptureTarget?>)
Link copied to clipboard
open fun onScrolled(@Px dx: Int, @Px dy: Int)
Link copied to clipboard
open override fun onScrollStateChanged(state: Int)
Link copied to clipboard
open fun onStartNestedScroll(child: View, target: View, nestedScrollAxes: Int): Boolean
Link copied to clipboard
Link copied to clipboard
open fun onStopNestedScroll(child: View)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onViewAdded(child: View?)
Link copied to clipboard
open fun onViewRemoved(child: View?)
Link copied to clipboard
Link copied to clipboard
open fun onVisibilityAggregated(isVisible: Boolean)
Link copied to clipboard
open fun onWindowFocusChanged(hasWindowFocus: Boolean)
Link copied to clipboard
Link copied to clipboard
open fun performAccessibilityAction(action: Int, arguments: Bundle?): Boolean
Link copied to clipboard
open fun performClick(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun performHapticFeedback(feedbackConstant: Int): Boolean
open fun performHapticFeedback(feedbackConstant: Int, flags: Int): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun playSoundEffect(soundConstant: Int)
Link copied to clipboard
open fun post(action: Runnable?): Boolean
Link copied to clipboard
open fun postDelayed(action: Runnable?, delayMillis: Long): Boolean
Link copied to clipboard
open fun postInvalidate()
open fun postInvalidate(left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard
open fun postInvalidateDelayed(delayMilliseconds: Long)
open fun postInvalidateDelayed(delayMilliseconds: Long, left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard
open fun postInvalidateOnAnimation(left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard
open fun postOnAnimation(action: Runnable?)
Link copied to clipboard
open fun postOnAnimationDelayed(action: Runnable?, delayMillis: Long)
Link copied to clipboard
open fun propagateRequestedFrameRate(frameRate: Float, forceOverride: Boolean)
Link copied to clipboard
open fun recomputeViewAttributes(child: View?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun removeAllViews()
Link copied to clipboard
Link copied to clipboard
open fun removeCallbacks(action: Runnable?): Boolean
Link copied to clipboard
open fun removeItemDecorationAt(index: Int)
Link copied to clipboard

Removes a listener added by addOnFocusLostListener

Link copied to clipboard
Link copied to clipboard
override fun removeView(view: View)
Link copied to clipboard
override fun removeViewAt(index: Int)
Link copied to clipboard
open fun removeViewInLayout(view: View?)
Link copied to clipboard
open fun removeViews(start: Int, count: Int)
Link copied to clipboard
open fun removeViewsInLayout(start: Int, count: Int)
Link copied to clipboard
open fun reportAppJankStats(appJankStats: AppJankStats)
Link copied to clipboard
Link copied to clipboard
open fun requestChildFocus(child: View?, focused: View?)
Link copied to clipboard
open fun requestChildRectangleOnScreen(child: View, rect: Rect?, immediate: Boolean): Boolean
Link copied to clipboard
open fun requestDisallowInterceptTouchEvent(disallowIntercept: Boolean)
Link copied to clipboard
Link copied to clipboard
fun requestFocus(direction: Int): Boolean
open fun requestFocus(direction: Int, previouslyFocusedRect: Rect?): Boolean
Link copied to clipboard
Link copied to clipboard
override fun requestLayout()
Link copied to clipboard
Link copied to clipboard
open fun requestRectangleOnScreen(rectangle: Rect?): Boolean
open fun requestRectangleOnScreen(rectangle: Rect?, immediate: Boolean): Boolean
Link copied to clipboard
Link copied to clipboard
open fun requestTransparentRegion(child: View?)
Link copied to clipboard
fun <T : View?> requireViewById(id: Int): T & Any
Link copied to clipboard
open fun resetPivot()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun saveAttributeDataForStyleable(context: Context, styleable: IntArray, attrs: AttributeSet?, t: TypedArray, defStyleAttr: Int, defStyleRes: Int)
Link copied to clipboard
open fun saveHierarchyState(container: SparseArray<Parcelable?>?)
Link copied to clipboard
open fun scheduleDrawable(who: Drawable, what: Runnable, when: Long)
Link copied to clipboard
Link copied to clipboard
open fun scrollBy(x: Int, y: Int)
Link copied to clipboard
open fun scrollTo(x: Int, y: Int)
Link copied to clipboard
open fun scrollToPosition(position: Int)
Link copied to clipboard
open fun sendAccessibilityEvent(eventType: Int)
Link copied to clipboard
open fun setAccessibilityDataSensitive(accessibilityDataSensitive: Int)
Link copied to clipboard
open override fun setAdapter(adapter: RecyclerView.Adapter<*>?)
Link copied to clipboard
open fun setAddStatesFromChildren(addsStates: Boolean)
Link copied to clipboard
fun setAlignmentLookup(lookup: AlignmentLookup?, smooth: Boolean = false)

Set a custom alignment configuration for each ViewHolder. Check AlignmentLookup. This is only supported in linear layouts

Link copied to clipboard
fun setAlignments(parent: ParentAlignment, child: ChildAlignment, smooth: Boolean)

Updates both parent and child alignments

Link copied to clipboard
open fun setAllowClickWhenDisabled(clickableWhenDisabled: Boolean)
Link copied to clipboard
open fun setAllowedHandwritingDelegatePackage(allowedPackageName: String?)
Link copied to clipboard
open fun setAllowedHandwritingDelegatorPackage(allowedPackageName: String?)
Link copied to clipboard
open fun setAutofillHints(vararg autofillHints: String?)
Link copied to clipboard
open fun setBackgroundColor(color: Int)
Link copied to clipboard
open fun setBackgroundDrawable(background: Drawable?)
Link copied to clipboard
open fun setBackgroundResource(resid: Int)
Link copied to clipboard
fun setChildAlignment(alignment: ChildAlignment, smooth: Boolean = false)

Updates the child alignment configuration for child views of this RecyclerView

Link copied to clipboard
Link copied to clipboard

Sets the strategy for calculating extra layout space.

Link copied to clipboard
override fun setFadingEdgeLength(length: Int)
Link copied to clipboard

Changes how RecyclerView will find the next focusable view. Check FocusableDirection for all supported directions. Default is FocusableDirection.STANDARD

Link copied to clipboard

Enables or disables the default rule of drawing the selected view after all other views. Default is true

Link copied to clipboard
fun setFocusOutAllowed(throughFront: Boolean, throughBack: Boolean)

Sets whether focus can move out from the front and/or back of the RecyclerView.

Link copied to clipboard
fun setFocusOutSideAllowed(throughFront: Boolean, throughBack: Boolean)

Sets whether focus can move out from the opposite front and/or back of the RecyclerView

Link copied to clipboard
fun setFocusSearchDebounceMs(debounceMs: Int?)

Use this to ignore fast key events while scrolling. By default, this is null, which means there is no debouncing.

Link copied to clipboard

Deprecated: use setFocusSearchEnabled instead

Link copied to clipboard

Enables or disables focus search with key presses. By default this is true. Disabling this will prevent DpadRecyclerView from intercepting key events to switch focus

Link copied to clipboard

Disables or enables focus search while RecyclerView is animating item changes. See RecyclerView.isAnimating.

Link copied to clipboard
fun setGravity(gravity: Int)

Sets the gravity used for child view positioning. Defaults to Gravity.TOP for horizontal orientation and Gravity.START for vertical orientation.

Link copied to clipboard
open fun setHandwritingBoundsOffsets(offsetLeft: Float, offsetTop: Float, offsetRight: Float, offsetBottom: Float)
Link copied to clipboard
override fun setHasFixedSize(hasFixedSize: Boolean)
Link copied to clipboard

Controls the return value of View.hasOverlappingRendering.

Link copied to clipboard
open fun setHasTransientState(hasTransientState: Boolean)
Link copied to clipboard

Sets the number of items to prefetch in RecyclerView.LayoutManager.collectInitialPrefetchPositions, which defines how many inner items should be prefetched when this RecyclerView is nested inside another RecyclerView.

Link copied to clipboard
open fun setIsCredential(isCredential: Boolean)
Link copied to clipboard
open fun setIsHandwritingDelegate(isHandwritingDelegate: Boolean)
Link copied to clipboard
Link copied to clipboard
fun setItemEdgeSpacing(@Px spacing: Int)

Sets the spacing between the min end and the first item, and the last item and the min edge. This is equivalent to calling both setItemMinEdgeSpacing and setItemMaxEdgeSpacing with the same value.

Link copied to clipboard
fun setItemMaxEdgeSpacing(@Px spacing: Int)

Set the spacing between the max edge and the last item

Link copied to clipboard
fun setItemMinEdgeSpacing(@Px spacing: Int)

Set the spacing between the min edge and the first item

Link copied to clipboard
fun setItemSpacing(@Px spacing: Int)

Set the spacing between different items

Link copied to clipboard
open fun setItemViewCacheSize(size: Int)
Link copied to clipboard
open fun setLayerPaint(paint: Paint?)
Link copied to clipboard
open fun setLayerType(layerType: Int, paint: Paint?)
Link copied to clipboard

Allows disabling the layout of children. All children are removed if layout is disabled

Link copied to clipboard
Link copied to clipboard

By default, DpadRecyclerView does not skip layout requests during scrolling, but you might want to do this because of the following:

Link copied to clipboard
fun setLeftTopRightBottom(left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard

Updates the loop direction used by this DpadRecyclerView. By default, the layout does not loop around the items

Link copied to clipboard

Sets the length of the fading effect applied to the max edge in pixels

Link copied to clipboard

Sets the length of the fading effect applied to the min edge in pixels

Link copied to clipboard

Sets the length of the fading effect applied to the min edge in pixels

Link copied to clipboard

Sets the start position of the fading effect applied to the min edge in pixels. Default is 0, which means that the fading effect starts from the min edge (left or top)

Link copied to clipboard

Registers a callback to be invoked when an item of this DpadRecyclerView has been laid out.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Set a listener that intercepts key events received in dispatchKeyEvent

Link copied to clipboard
Link copied to clipboard

Sets the generic motion intercept listener.

Link copied to clipboard
open fun setOnReceiveContentListener(mimeTypes: Array<out String?>??, listener: OnReceiveContentListener?)
Link copied to clipboard
Link copied to clipboard

Sets a listener for intercepting touch events

Link copied to clipboard
Link copied to clipboard

Set a listener that intercepts unhandled key events from dispatchKeyEvent

Link copied to clipboard
fun setOrientation(orientation: Int)

Updates the orientation of the PivotLayoutManager used by this RecyclerView

Link copied to clipboard
open fun setPadding(left: Int, top: Int, right: Int, bottom: Int)
Link copied to clipboard
open fun setPaddingRelative(start: Int, top: Int, end: Int, bottom: Int)
Link copied to clipboard
fun setParentAlignment(alignment: ParentAlignment, smooth: Boolean = false)

Updates the parent alignment configuration for child views of this RecyclerView

Link copied to clipboard

Set whether the LayoutManager of this RecyclerView will recycle its children when this RecyclerView is detached from the window.

Link copied to clipboard
Link copied to clipboard
open fun setRenderEffect(renderEffect: RenderEffect?)
Link copied to clipboard
fun setReverseLayout(reverseLayout: Boolean)

Used to reverse item traversal and layout order. This behaves similar to the layout change for RTL views. When set to true, first item is laid out at the end of the UI, second item is laid out before it etc.

Link copied to clipboard

Enables or disables scrolling. When this is disabled, DpadRecyclerView can still change focus on DPAD events unless setFocusSearchEnabled is also set to true.

Link copied to clipboard
open fun setScrollingTouchSlop(slopConstant: Int)
Link copied to clipboard
fun setSelectedPosition(position: Int)

Changes the selected item immediately without any scroll animation.

fun setSelectedPosition(position: Int, task: ViewHolderTask)

Performs a task on a ViewHolder at a given position after scrolling to it.

Link copied to clipboard

Changes the selected item and runs an animation to scroll to the target position.

Performs a task on a ViewHolder at a given position after scrolling to it.

Link copied to clipboard
fun setSelectedSubPosition(subPosition: Int)

Changes the sub selected view immediately without any scroll animation.

fun setSelectedSubPosition(position: Int, subPosition: Int)

Changes the main selection and sub selected view immediately without any scroll animation.

fun setSelectedSubPosition(position: Int, subPosition: Int, task: ViewHolderTask)

Performs a task on a ViewHolder at a given position and sub position after scrolling to it.

Link copied to clipboard
fun setSelectedSubPositionSmooth(position: Int, subPosition: Int)

Changes the sub selected view and runs and animation to scroll to it.

fun setSelectedSubPositionSmooth(position: Int, subPosition: Int, task: ViewHolderTask)

Performs a task on a ViewHolder at a given position and sub position after scrolling to it.

Link copied to clipboard

Enable or disable smooth scrolling to new focused position. By default, this is set to true. When set to false, RecyclerView will scroll immediately to the focused view without any animation.

Link copied to clipboard
Link copied to clipboard

Whenever the user triggers a focus change via a key event, DpadRecyclerView will check if it already has max number of pending alignment changes before dispatching focus to the next view.

Link copied to clipboard

When the user holds down a key, a lot of key events will be generated by the system. These events are generated a lot faster than this DpadRecyclerView can scroll, so these events need to be cached until the user stops pressing the key.

Link copied to clipboard
fun setSmoothScrollSpeedFactor(smoothScrollSpeedFactor: Float)

Set how slow the smooth scroller should run. Example:

Link copied to clipboard
fun setSpanCount(spans: Int)

Updates the number of spans of the PivotLayoutManager used by this RecyclerView.

Link copied to clipboard

Updates the DpadSpanSizeLookup used by the layout manager of this RecyclerView.

Link copied to clipboard
open fun setTransitionVisibility(visibility: Int)
Link copied to clipboard
Link copied to clipboard
open fun setWillNotCacheDrawing(willNotCacheDrawing: Boolean)
Link copied to clipboard
override fun setWillNotDraw(willNotDraw: Boolean)
Link copied to clipboard
Link copied to clipboard
open fun showContextMenuForChild(originalView: View?): Boolean
open fun showContextMenuForChild(originalView: View?, x: Float, y: Float): Boolean
Link copied to clipboard
open fun smoothScrollBy(@Px dx: Int, @Px dy: Int, @Nullable interpolator: Interpolator?, duration: Int)
override fun smoothScrollBy(dx: Int, dy: Int)
override fun smoothScrollBy(dx: Int, dy: Int, interpolator: Interpolator?)
Link copied to clipboard
open fun smoothScrollToPosition(position: Int)
Link copied to clipboard
Link copied to clipboard
open fun startActionModeForChild(originalView: View?, callback: ActionMode.Callback?): ActionMode?
open fun startActionModeForChild(originalView: View?, callback: ActionMode.Callback?, type: Int): ActionMode?
Link copied to clipboard
open fun startAnimation(animation: Animation?)
Link copied to clipboard
fun startDrag(data: ClipData?, shadowBuilder: View.DragShadowBuilder?, myLocalState: Any?, flags: Int): Boolean
Link copied to clipboard
fun startDragAndDrop(data: ClipData?, shadowBuilder: View.DragShadowBuilder?, myLocalState: Any?, flags: Int): Boolean
Link copied to clipboard
Link copied to clipboard
open fun startNestedScroll(axes: Int): Boolean
open override fun startNestedScroll(axes: Int, type: Int): Boolean
Link copied to clipboard
open fun startViewTransition(view: View?)
Link copied to clipboard
open fun stopNestedScroll()
open fun stopNestedScroll(type: Int)
Link copied to clipboard
open fun stopScroll()
Link copied to clipboard
fun suppressLayout(suppress: Boolean)
Link copied to clipboard
open fun swapAdapter(@Nullable adapter: RecyclerView.Adapter<*>??, removeAndRecycleExistingViews: Boolean)
Link copied to clipboard
Link copied to clipboard
open fun transformMatrixToLocal(matrix: Matrix)
Link copied to clipboard
open fun unscheduleDrawable(who: Drawable, what: Runnable)
Link copied to clipboard
Link copied to clipboard
open fun updateViewLayout(view: View?, params: ViewGroup.LayoutParams?)
Link copied to clipboard
Link copied to clipboard
open fun willNotDraw(): Boolean