-
- All Implemented Interfaces:
-
android.os.Parcelable,com.monetization.ads.nativeads.template.appearance.NativeTemplateSizeConstraint
public final class SizeConstraint implements Parcelable, NativeTemplateSizeConstraint
SizeConstraint defines the way size is calculated based on banner size.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumSizeConstraint.SizeConstraintTypeConstraint type.
FIXED defines fixed size which never changes. FIXED_RATIO defines fixed asset size to banner size ratio which never changes. PREFERRED_RATIO defines asset size to banner size ratio which may change to fit real image size.
-
Field Summary
Fields Modifier and Type Field Description public final static Parcelable.Creator<SizeConstraint>CREATORpublic final static intCONTENTS_FILE_DESCRIPTORpublic final static intPARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
Constructors Constructor Description SizeConstraint(SizeConstraint.SizeConstraintType sizeConstraintType, float value)Constructs a new SizeConstraint configured with size type and value.
-
Method Summary
Modifier and Type Method Description floatgetValue()Returns value of the SizeConstraint. SizeConstraint.SizeConstraintTypegetSizeConstraintType()Returns size constraint type. inthashCode()booleanequals(Object o)intdescribeContents()voidwriteToParcel(Parcel dest, int flags)-
-
Constructor Detail
-
SizeConstraint
SizeConstraint(SizeConstraint.SizeConstraintType sizeConstraintType, float value)
Constructs a new SizeConstraint configured with size type and value.- Parameters:
sizeConstraintType- Constraint size type.value- Constraint value.
-
-
Method Detail
-
getValue
float getValue()
Returns value of the SizeConstraint.
-
getSizeConstraintType
@NonNull() SizeConstraint.SizeConstraintType getSizeConstraintType()
Returns size constraint type.
-
hashCode
int hashCode()
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
-
-
-