Package com.batch.android.messaging.view
Class FlexboxLayout.LayoutParams
- java.lang.Object
-
- android.view.ViewGroup.LayoutParams
-
- android.view.ViewGroup.MarginLayoutParams
-
- com.batch.android.messaging.view.FlexboxLayout.LayoutParams
-
- Enclosing class:
- FlexboxLayout
public static class FlexboxLayout.LayoutParams extends android.view.ViewGroup.MarginLayoutParamsPer child parameters for children views of theFlexboxLayout.
-
-
Field Summary
Fields Modifier and Type Field Description static intALIGN_SELF_AUTOstatic intALIGN_SELF_BASELINEstatic intALIGN_SELF_CENTERstatic intALIGN_SELF_FLEX_ENDstatic intALIGN_SELF_FLEX_STARTstatic intALIGN_SELF_STRETCHintalignSelfThis attributes determines the alignment along the cross axis (perpendicular to the main axis).static floatFLEX_BASIS_PERCENT_DEFAULTfloatflexBasisPercentThe initial flex item length in a fraction format relative to its parent.floatflexGrowThis attribute determines how much this child will grow if positive free space is distributed relative to the rest of other flex items included in the same flex line.floatflexShrinkThis attributes determines how much this child will shrink is negative free space is distributed relative to the rest of other flex items included in the same flex line.intmaxHeightThis attribute determines the maximum height the child can expand to.intmaxWidthThis attribute determines the maximum width the child can expand to.intminHeightThis attribute determines the minimum height the child can shrink to.intminWidthThis attribute determines the minimum width the child can shrink to.intorderThis attribute can change the ordering of the children views are laid out.booleanwrapBeforeThis attribute forces a flex line wrapping.
-
Constructor Summary
Constructors Constructor Description LayoutParams(int width, int height)LayoutParams(android.content.Context context, android.util.AttributeSet attrs)LayoutParams(android.view.ViewGroup.LayoutParams source)LayoutParams(FlexboxLayout.LayoutParams source)
-
-
-
Field Detail
-
FLEX_BASIS_PERCENT_DEFAULT
public static final float FLEX_BASIS_PERCENT_DEFAULT
- See Also:
- Constant Field Values
-
ALIGN_SELF_AUTO
public static final int ALIGN_SELF_AUTO
- See Also:
- Constant Field Values
-
ALIGN_SELF_FLEX_START
public static final int ALIGN_SELF_FLEX_START
- See Also:
- Constant Field Values
-
ALIGN_SELF_FLEX_END
public static final int ALIGN_SELF_FLEX_END
- See Also:
- Constant Field Values
-
ALIGN_SELF_CENTER
public static final int ALIGN_SELF_CENTER
- See Also:
- Constant Field Values
-
ALIGN_SELF_BASELINE
public static final int ALIGN_SELF_BASELINE
- See Also:
- Constant Field Values
-
ALIGN_SELF_STRETCH
public static final int ALIGN_SELF_STRETCH
- See Also:
- Constant Field Values
-
order
public int order
This attribute can change the ordering of the children views are laid out. By default, children are displayed and laid out in the same order as they appear in the layout XML. If not specified,ORDER_DEFAULTis set as a default value.
-
flexGrow
public float flexGrow
This attribute determines how much this child will grow if positive free space is distributed relative to the rest of other flex items included in the same flex line. If not specified,FLEX_GROW_DEFAULTis set as a default value.
-
flexShrink
public float flexShrink
This attributes determines how much this child will shrink is negative free space is distributed relative to the rest of other flex items included in the same flex line. If not specified,FLEX_SHRINK_DEFAULTis set as a default value.
-
alignSelf
public int alignSelf
This attributes determines the alignment along the cross axis (perpendicular to the main axis). The alignment in the same direction can be determined by theFlexboxLayout.mAlignItemsin the parent, but if this is set to other thanALIGN_SELF_AUTO, the cross axis alignment is overridden for this child. The value needs to be one of the values in (ALIGN_SELF_AUTO,ALIGN_SELF_STRETCH,ALIGN_SELF_FLEX_START,ALIGN_SELF_FLEX_END,ALIGN_SELF_CENTER, orALIGN_SELF_BASELINE). If not specified,ALIGN_SELF_AUTOis set as a default value.
-
flexBasisPercent
public float flexBasisPercent
The initial flex item length in a fraction format relative to its parent. The initial main size of this child View is trying to be expanded as the specified fraction against the parent main size. If this value is set, the length specified from layout_width (or layout_height) is overridden by the calculated value from this attribute. This attribute is only effective when the parent's MeasureSpec mode is MeasureSpec.EXACTLY. The default value isFLEX_BASIS_PERCENT_DEFAULT, which means not set.
-
minWidth
public int minWidth
This attribute determines the minimum width the child can shrink to.
-
minHeight
public int minHeight
This attribute determines the minimum height the child can shrink to.
-
maxWidth
public int maxWidth
This attribute determines the maximum width the child can expand to.
-
maxHeight
public int maxHeight
This attribute determines the maximum height the child can expand to.
-
wrapBefore
public boolean wrapBefore
This attribute forces a flex line wrapping. i.e. if this is set totruefor a flex item, the item will become the first item of the new flex line. (A wrapping happens regardless of the flex items being processed in the the previous flex line) This attribute is ignored if the flex_wrap attribute is set as nowrap. The equivalent attribute isn't defined in the original CSS Flexible Box Module specification, but having this attribute is useful for Android developers to flatten the layouts when building a grid like layout or for a situation where developers want to put a new flex line to make a semantic difference from the previous one, etc.
-
-
Constructor Detail
-
LayoutParams
public LayoutParams(android.content.Context context, android.util.AttributeSet attrs)
-
LayoutParams
public LayoutParams(FlexboxLayout.LayoutParams source)
-
LayoutParams
public LayoutParams(android.view.ViewGroup.LayoutParams source)
-
LayoutParams
public LayoutParams(int width, int height)
-
-