public class ResponsiveOffsetRule extends java.lang.Object implements OffsetRule
OffsetRule that changes the offset of the current
UiElement based on the size of the parent UiElement. The
parent element is split into 12 columns and the ResponsiveOffsetRule
sets how many columns to offset by.| Constructor and Description |
|---|
ResponsiveOffsetRule(int columns)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
float |
getOffset(LayoutState layoutState)
Determines the preferred offset of a
UiElement |
public ResponsiveOffsetRule(int columns)
columns - The offset in columnspublic float getOffset(LayoutState layoutState)
OffsetRuleUiElementgetOffset in interface OffsetRulelayoutState - The current LayoutStateUiElement preferred offset