Class PercentLayoutHelper.PercentLayoutInfo
- java.lang.Object
-
- com.batch.android.messaging.view.percent.PercentLayoutHelper.PercentLayoutInfo
-
- Enclosing class:
- PercentLayoutHelper
public static class PercentLayoutHelper.PercentLayoutInfo extends java.lang.ObjectContainer for information about percentage dimensions and margins. It acts as an extension forLayoutParams.
-
-
Field Summary
Fields Modifier and Type Field Description floatbottomMarginPercentfloatendMarginPercentfloatheightPercentfloatleftMarginPercentfloatrightMarginPercentfloatstartMarginPercentfloattopMarginPercentfloatwidthPercent
-
Constructor Summary
Constructors Constructor Description PercentLayoutInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfillLayoutParams(android.view.ViewGroup.LayoutParams params, int widthHint, int heightHint)FillsViewGroup.LayoutParamsdimensions based on percentage values.voidfillMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams params, int widthHint, int heightHint)FillsViewGroup.MarginLayoutParamsdimensions and margins based on percentage values.voidrestoreLayoutParams(android.view.ViewGroup.LayoutParams params)Restores original dimensions after they were changed for percentage based values.voidrestoreMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams params)Restores original dimensions and margins after they were changed for percentage based values.java.lang.StringtoString()
-
-
-
Field Detail
-
widthPercent
public float widthPercent
-
heightPercent
public float heightPercent
-
leftMarginPercent
public float leftMarginPercent
-
topMarginPercent
public float topMarginPercent
-
rightMarginPercent
public float rightMarginPercent
-
bottomMarginPercent
public float bottomMarginPercent
-
startMarginPercent
public float startMarginPercent
-
endMarginPercent
public float endMarginPercent
-
-
Method Detail
-
fillLayoutParams
public void fillLayoutParams(android.view.ViewGroup.LayoutParams params, int widthHint, int heightHint)FillsViewGroup.LayoutParamsdimensions based on percentage values.
-
fillMarginLayoutParams
public void fillMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams params, int widthHint, int heightHint)FillsViewGroup.MarginLayoutParamsdimensions and margins based on percentage values.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
restoreMarginLayoutParams
public void restoreMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams params)
Restores original dimensions and margins after they were changed for percentage based values. Calling this method only makes sense if you previously calledfillMarginLayoutParams(android.view.ViewGroup.MarginLayoutParams, int, int).
-
restoreLayoutParams
public void restoreLayoutParams(android.view.ViewGroup.LayoutParams params)
Restores original dimensions after they were changed for percentage based values. Calling this method only makes sense if you previously calledfillLayoutParams(android.view.ViewGroup.LayoutParams, int, int).
-
-