-
public class PercentLayoutHelper.PercentLayoutInfoContainer for information about percentage dimensions and margins. It acts as an extensionfor
{@code LayoutParams}.
-
-
Field Summary
Fields Modifier and Type Field Description public floatwidthPercentpublic floatheightPercentpublic floatleftMarginPercentpublic floattopMarginPercentpublic floatrightMarginPercentpublic floatbottomMarginPercentpublic floatstartMarginPercentpublic floatendMarginPercent
-
Constructor Summary
Constructors Constructor Description PercentLayoutHelper.PercentLayoutInfo()
-
Method Summary
Modifier and Type Method Description voidfillLayoutParams(ViewGroup.LayoutParams params, int widthHint, int heightHint)Fills {@code ViewGroup.LayoutParams}dimensions based on percentage values.voidfillMarginLayoutParams(ViewGroup.MarginLayoutParams params, int widthHint, int heightHint)Fills {@code ViewGroup.MarginLayoutParams}dimensions and margins based on percentagevalues.StringtoString()voidrestoreMarginLayoutParams(ViewGroup.MarginLayoutParams params)Restores original dimensions and margins after they were changed for percentage basedvalues. voidrestoreLayoutParams(ViewGroup.LayoutParams params)Restores original dimensions after they were changed for percentage based values. -
-
Method Detail
-
fillLayoutParams
void fillLayoutParams(ViewGroup.LayoutParams params, int widthHint, int heightHint)
Fills
{@code ViewGroup.LayoutParams}dimensions based on percentage values.
-
fillMarginLayoutParams
void fillMarginLayoutParams(ViewGroup.MarginLayoutParams params, int widthHint, int heightHint)
Fills
{@code ViewGroup.MarginLayoutParams}dimensions and margins based on percentagevalues.
-
restoreMarginLayoutParams
void restoreMarginLayoutParams(ViewGroup.MarginLayoutParams params)
Restores original dimensions and margins after they were changed for percentage basedvalues. Calling this method only makes sense if you previously called fillMarginLayoutParams.
-
restoreLayoutParams
void restoreLayoutParams(ViewGroup.LayoutParams params)
Restores original dimensions after they were changed for percentage based values. Callingthis method only makes sense if you previously called fillLayoutParams.
-
-
-
-