Package com.unblu.sdk.core.ui
Class UnbluImageResourceWrapper
java.lang.Object
com.unblu.sdk.core.ui.UnbluImageResourceWrapper
- Direct Known Subclasses:
UnbluImageResourceWrapper.Drawable
,UnbluImageResourceWrapper.ImageVectorResource
,UnbluImageResourceWrapper.Url
A wrapper class used to represent different types of image resources,
This class provides a way to abstract the handling of drawable resources, ImageVector resources and URLs,
allowing them to be used when displaying the floating conversation indicator
The ImageResourceWrapper class is designed to be used with Jetpack Compose to display the image. It supports three types of resource:
- Drawable resources, typically stored in the res/drawable directory
- ImageVector resources
- URLs used to load web image resources
Usage Example:
// Example for Drawable resource with tint:
UnbluImageResourceWrapper drawableResource = new UnbluImageResourceWrapper.Drawable(R.drawable.my_image, R.color.my_tint_color);
// Example for ImageVector resource with color filter:
ImageVector imageVector = ImageVector.vectorResource(id = R.drawable.my_vector_image);
ColorFilter colorFilter = ColorFilter.tint(Color.Red);
UnbluImageResourceWrapper vectorResource = new UnbluImageResourceWrapper.ImageVectorResource(imageVector, colorFilter);
// Example for URL resource:
UnbluImageResourceWrapper urlResource = new UnbluImageResourceWrapper.Url("https://image.resource.url");
myComponent.setFloatingIndicatorIcon(drawableResource);
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
static final class
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
UnbluImageResourceWrapper
public UnbluImageResourceWrapper()
-
-
Method Details
-
getDefault
-