ParentAlignment

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

Constructors

Link copied to clipboard
constructor(parcel: Parcel)
constructor(edge: ParentAlignment.Edge = Edge.MIN_MAX, offset: Int = ViewAlignment.DEFAULT_OFFSET, fraction: Float = ViewAlignment.DEFAULT_FRACTION, isFractionEnabled: Boolean = true, preferKeylineOverEdge: Boolean = edge == MAX)

Types

Link copied to clipboard
Link copied to clipboard

Overrides the keyline alignment and instead aligns to a certain edge.

Properties

Link copied to clipboard

The specific alignment to a given edge that overrides the keyline alignment. See Edge Default: Edge.MIN_MAX

Link copied to clipboard

The keyline position for the alignment. Default: 0.5f (center)

Link copied to clipboard

true if fraction should be used to position the item.

Link copied to clipboard
val offset: Int

The distance added to the fraction of the RecyclerView in pixels.

Link copied to clipboard

When Edge.MAX or Edge.MIN are used, this flag decides if the Views should be aligned to the keyline when there are few items, overriding the edge preference.

Functions

Link copied to clipboard
open override fun describeContents(): Int
Link copied to clipboard
open override fun writeToParcel(parcel: Parcel, flags: Int)