public class InAppMessageImageView extends AppCompatImageView implements IInAppMessageImageView
Constructor and Description |
---|
InAppMessageImageView(android.content.Context context,
android.util.AttributeSet attrs) |
Modifier and Type | Method and Description |
---|---|
protected void |
onDraw(android.graphics.Canvas canvas) |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
void |
setAspectRatio(float aspectRatio) |
void |
setCornersRadiiPx(float topLeft,
float topRight,
float bottomLeft,
float bottomRight)
Instruct the view to use the given radii for its corners.
|
void |
setCornersRadiusPx(float cornersRadius)
Instruct the view to use the given radius for its corners.
|
void |
setInAppMessageImageCropType(CropType cropType)
Instruct the view to use
ImageView.ScaleType.CENTER_CROP or equivalent. |
void |
setToHalfParentHeight(boolean setToHalfHeight) |
public InAppMessageImageView(android.content.Context context, android.util.AttributeSet attrs)
public void setCornersRadiiPx(float topLeft, float topRight, float bottomLeft, float bottomRight)
IInAppMessageImageView
setCornersRadiiPx
in interface IInAppMessageImageView
topLeft
- top-left corner radius in pxtopRight
- top-right corner radius in pxbottomLeft
- bottom-left corner radius in pxbottomRight
- bottom-right corner radius in pxpublic void setCornersRadiusPx(float cornersRadius)
IInAppMessageImageView
setCornersRadiusPx
in interface IInAppMessageImageView
cornersRadius
- radius for all corners in pxpublic void setInAppMessageImageCropType(CropType cropType)
IInAppMessageImageView
ImageView.ScaleType.CENTER_CROP
or equivalent.setInAppMessageImageCropType
in interface IInAppMessageImageView
public void setAspectRatio(float aspectRatio)
setAspectRatio
in interface IInAppMessageImageView
public void setToHalfParentHeight(boolean setToHalfHeight)
setToHalfParentHeight
in interface IInAppMessageImageView
protected void onDraw(android.graphics.Canvas canvas)
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)