BlazeWidgetItemImageStyle - Android
The BlazeWidgetItemImageStyle class is responsible for defining the style and layout of the image within a widget item. It includes properties for positioning, size, thumbnail type, and border customization.
Properties
position: BlazeImagePosition,
width: BlazeDp?,
height: BlazeDp?,
ratio: Float?,
border: BlazeWidgetItemImageContainerBorderStyle,
thumbnailType: BlazeThumbnailType?,
cornerRadius: BlazeDp,
cornerRadiusRatio: Float?,
margins: BlazeInsets,
gradientOverlay: BlazeWidgetItemImageGradientOverlayStyle,
animatedThumbnail: BlazeWidgetItemImageAnimatedThumbnailStyleposition
var position: BlazeImagePositionThe position of the image within the widget item.
width
var width: BlazeDp?The width of the image.
height
var height: BlazeDp?The height of the image.
ratio
var ratio: Float?The aspect ratio of the image.
border
var position: BlazeWidgetItemImageContainerBorderStyleThe border style of the image container.
thumbnailType
var thumbnailType: BlazeThumbnailType?The type of the thumbnail for the image.
cornerRadius
var cornerRadius: BlazeDpThe corner radius of the image.
cornerRadiusRatio
var cornerRadiusRatio: Float?The corner radius ratio is a value between 0.0 and 1.0, which computes the final corner radius for the image. Overrides the corner radius property. For example, a value of 0.5 on a 1:1 width/height image will result in a perfect circle style for the image.
margins
margins: BlazeInsetsThe margins of the image.
gradientOverlay
var gradientOverlay: BlazeWidgetItemImageGradientOverlayStyleThe gradient overlay style of the image.
animatedThumbnail
var animatedThumbnail: BlazeWidgetItemImageAnimatedThumbnailStyleAn object defining Animated Thumbnail behavior.
If used, please see the BlazeWidgetLayout.Presets.MomentsWidget.Row.verticalAnimatedThumbnailsRectangles preset.
Note animatedThumbnail is applicable only to Moments Row widgets. Any usage on any other scope will result in a no-op.
BlazeImagePosition Enum
The Position enum provides predefined positions for the image within the widget item:
| Value | Description |
|---|---|
| TopStart | The image is positioned at the top start corner. |
| TopCenter | The image is positioned at the top center. |
| TopEnd | The image is positioned at the top end corner. |
| CenterStart | The image is positioned at the center start edge. |
| Center | The image is positioned at the center. |
| CenterEnd | The image is positioned at the center end edge. |
| BottomStart | The image is positioned at the bottom start corner. |
| BottomCenter | The image is positioned at the bottom center. |
| BottomEnd | The image is positioned at the bottom end corner. |
ThumbnailModelType Enum
The ThumbnailModelType enum defines the type of the image thumbnail:
| Value | Description |
|---|---|
| SQUARE_ICON | Use the 1:1 thumbnail image defined as the thumbnail |
| VERTICAL_TWO_BY_THREE | Use the 2:3 thumbnail image defined as the thumbnail |
| CUSTOM | Use the main thumbnail image defined as a custom thumbnail |
Updated 11 days ago
