Package-level declarations

Types

Link copied to clipboard
interface AlignmentLookup

Allows DpadRecyclerView to align differently for each ViewHolder. When this is used, the ParentAlignment.Edge preference has no effect and you're fully responsible to pick an anchor for all ViewHolders

Link copied to clipboard
data class ChildAlignment(val offset: Int = ViewAlignment.DEFAULT_OFFSET, val fraction: Float = ViewAlignment.DEFAULT_FRACTION, val isFractionEnabled: Boolean = true, val includePadding: Boolean = false, val alignToBaseline: Boolean = false) : ViewAlignment, Parcelable

Alignment configuration for aligning views in relation to its dimensions

Link copied to clipboard
class DpadDragHelper<T>(adapter: DpadDragHelper.DragAdapter<T>, callback: DpadDragHelper.DragCallback, stopKeyCodes: Set<Int> = setOf( KeyEvent.KEYCODE_DPAD_CENTER, KeyEvent.KEYCODE_ENTER, ))

A helper class for re-ordering the contents of a DpadRecyclerView.

Link copied to clipboard

Defines how items are looped around in DpadRecyclerView.

Link copied to clipboard
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.

Link copied to clipboard
class DpadScrollableLayout @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : LinearLayout

A layout that behaves similarly to AppBarLayout inside a CoordinatorLayout but with the caveat that nested scrolling is simulated and not actually real.

Link copied to clipboard
class DpadScroller(calculator: DpadScroller.ScrollDistanceCalculator = DefaultScrollDistanceCalculator())

A helper class that allows scrolling a DpadRecyclerView based on specific scroll distances, ignoring the default alignment behavior.

Link copied to clipboard

A SnapHelper that scrolls Views to their alignment configuration and performs selections automatically. Use this only if you need to support touch event handling, as DpadRecyclerView by default does not handle selection on touch events.

Link copied to clipboard
abstract class DpadSpanSizeLookup

A helper class to provide the number of spans each item occupies.

Link copied to clipboard
interface DpadViewHolder

A ViewHolder managed by DpadRecyclerView.

Link copied to clipboard

Overrides the default mechanism for laying out extra views at the borders of the RecyclerView. Check LinearLayoutManager.calculateExtraLayoutSpace for more details.

Link copied to clipboard

Listener for receiving layout events of children of this RecyclerView

Link copied to clipboard

Callback for receiving a notification when a DpadRecyclerView loses focus.

Link copied to clipboard

Callback for receiving a notification when a View of a RecyclerView.ViewHolder has been focused.

Link copied to clipboard

Callback for receiving a notification when a ViewHolder has been selected. There are two methods:

Link copied to clipboard
data class ParentAlignment(val edge: ParentAlignment.Edge = Edge.MIN_MAX, val offset: Int = ViewAlignment.DEFAULT_OFFSET, val fraction: Float = ViewAlignment.DEFAULT_FRACTION, val isFractionEnabled: Boolean = true, val preferKeylineOverEdge: Boolean = edge == MAX) : Parcelable

Alignment configuration for aligning views in relation to the RecyclerView bounds

Link copied to clipboard
data class SubPositionAlignment(val offset: Int = ViewAlignment.DEFAULT_OFFSET, val fraction: Float = ViewAlignment.DEFAULT_FRACTION, val isFractionEnabled: Boolean = true, val includePadding: Boolean = false, val alignToBaseline: Boolean = false, val alignmentViewId: Int = View.NO_ID, focusViewId: Int = View.NO_ID) : ViewAlignment, Parcelable

Alignment configuration specific to a certain sub position.

Link copied to clipboard

A RecyclerView.RecycledViewPool that does not limit the number of ViewHolders recycled.

Link copied to clipboard
interface ViewAlignment
Link copied to clipboard
abstract class ViewHolderTask(val executeWhenAligned: Boolean = false)

Task that's scheduled and executed when a ViewHolder is selected