SubPositionAlignment

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.

This will override the default alignment set from ChildAlignment.

Constructors

Link copied to clipboard
constructor(parcel: Parcel)
constructor(offset: Int = ViewAlignment.DEFAULT_OFFSET, fraction: Float = ViewAlignment.DEFAULT_FRACTION, isFractionEnabled: Boolean = true, includePadding: Boolean = false, alignToBaseline: Boolean = false, alignmentViewId: Int = View.NO_ID, focusViewId: Int = View.NO_ID)

Types

Link copied to clipboard

Properties

Link copied to clipboard

The id of the child view that should be used for the alignment. If it is View.NO_ID, then the root view will be used instead. This is not necessarily the same view that will receive focus.

Link copied to clipboard
open override val alignToBaseline: Boolean = false

When true, aligns to View.getBaseline for the view used for the alignment

Link copied to clipboard
open override val fraction: Float

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

Link copied to clipboard
open override val includePadding: Boolean = false

True if padding should be included for the alignment. Includes start/top padding if fraction is 0f. Includes end/bottom padding if fraction is 1f. If fraction is not 0f or 1f, padding isn't included

Link copied to clipboard
open override val isFractionEnabled: Boolean = true

When enabled, fraction will be used for the alignment. Otherwise, only offset will be used.

Link copied to clipboard
open override val offset: Int

The distance to the fraction of the view in pixels.

Functions

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