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)
IInAppMessageImageViewsetCornersRadiiPx in interface IInAppMessageImageViewtopLeft - 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)
IInAppMessageImageViewsetCornersRadiusPx in interface IInAppMessageImageViewcornersRadius - radius for all corners in pxpublic void setInAppMessageImageCropType(CropType cropType)
IInAppMessageImageViewImageView.ScaleType.CENTER_CROP or equivalent.setInAppMessageImageCropType in interface IInAppMessageImageViewpublic void setAspectRatio(float aspectRatio)
setAspectRatio in interface IInAppMessageImageViewpublic void setToHalfParentHeight(boolean setToHalfHeight)
setToHalfParentHeight in interface IInAppMessageImageViewprotected void onDraw(android.graphics.Canvas canvas)
protected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)