PercentLayoutInfo

Deprecated

Container for information about percentage dimensions and margins. It acts as an extension for LayoutParams.

Deprecated

use ConstraintLayout and Guidelines for layout support.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun fillLayoutParams(params: ViewGroup.LayoutParams, widthHint: Int, heightHint: Int)
Fills the width and height fields of the passed ViewGroup.LayoutParams object based on currently set percentage values.
Link copied to clipboard
open fun fillMarginLayoutParams(params: ViewGroup.MarginLayoutParams, widthHint: Int, heightHint: Int)

open fun fillMarginLayoutParams(view: View, params: ViewGroup.MarginLayoutParams, widthHint: Int, heightHint: Int)
Fills the margin fields of the passed ViewGroup.MarginLayoutParams object based on currently set percentage values and the current layout direction of the passed View.
Link copied to clipboard
Restores original dimensions after they were changed for percentage based values.
Link copied to clipboard
Restores the original dimensions and margins after they were changed for percentage based values.
Link copied to clipboard
open fun toString(): String

Properties

Link copied to clipboard
open var aspectRatio: Float
The decimal value of the percentage-based aspect ratio.
Link copied to clipboard
The decimal value of the percentage-based bottom margin.
Link copied to clipboard
The decimal value of the percentage-based end margin.
Link copied to clipboard
The decimal value of the percentage-based height.
Link copied to clipboard
The decimal value of the percentage-based left margin.
Link copied to clipboard
The decimal value of the percentage-based right margin.
Link copied to clipboard
The decimal value of the percentage-based start margin.
Link copied to clipboard
The decimal value of the percentage-based top margin.
Link copied to clipboard
The decimal value of the percentage-based width.