LayoutParams
open classLayoutParams: ViewGroup.LayoutParams
| kotlin.Any | ||
| ↳ | android.view.ViewGroup.LayoutParams | |
| ↳ | android.widget.AbsoluteLayout.LayoutParams | |
Per-child layout information associated with AbsoluteLayout. See Absolute Layout Attributes for a list of all child view attributes that this class supports.
Summary
| Inherited XML attributes | |
|---|---|
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
LayoutParams(c: Context!, attrs: AttributeSet!)Creates a new set of layout parameters. |
|
LayoutParams(source: ViewGroup.LayoutParams!) |
|
LayoutParams(width: Int, height: Int, x: Int, y: Int)Creates a new set of layout parameters with the specified width, height and location. |
|
| Public methods | |
|---|---|
| open String! | |
| Inherited functions | |
|---|---|
| Properties | |
|---|---|
| Int |
The horizontal, or X, location of the child within the view group. |
| Int |
The vertical, or Y, location of the child within the view group. |
| Inherited properties | |
|---|---|
Public constructors
LayoutParams
LayoutParams(
c: Context!,
attrs: AttributeSet!)
Creates a new set of layout parameters. The values are extracted from the supplied attributes set and context. The XML attributes mapped to this set of layout parameters are:
layout_x: the X location of the childlayout_y: the Y location of the child- All the XML attributes from
android.view.ViewGroup.LayoutParams
| Parameters | |
|---|---|
c |
Context!: the application environment |
attrs |
AttributeSet!: the set of attributes from which to extract the layout parameters values |
LayoutParams
LayoutParams(
width: Int,
height: Int,
x: Int,
y: Int)
Creates a new set of layout parameters with the specified width, height and location.
| Parameters | |
|---|---|
width |
Int: the width, either MATCH_PARENT, WRAP_CONTENT or a fixed size in pixels |
height |
Int: the height, either MATCH_PARENT, WRAP_CONTENT or a fixed size in pixels |
x |
Int: the X location of the child |
y |
Int: the Y location of the child |
Public methods
Properties
x
varx: Int
Deprecated: Deprecated in Java.
The horizontal, or X, location of the child within the view group.
y
vary: Int
Deprecated: Deprecated in Java.
The vertical, or Y, location of the child within the view group.