ChildAlignment

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

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)

Types

Link copied to clipboard

Properties

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
open override fun writeToParcel(parcel: Parcel, flags: Int)