DrawableUtils

open class DrawableUtils

Functions

Link copied to clipboard
open fun createDividerDrawable(height: Int, color: Int): Drawable
Link copied to clipboard
open fun createLayerIcon(@Nullable background: Drawable, @Nullable icon: Drawable, inset: Int): Drawable
Link copied to clipboard
open fun createOvalIcon(@NonNull context: Context, @ColorRes color: Int): Drawable
open fun createOvalIcon(@NonNull context: Context, @ColorRes backgroundColor: Int, @DrawableRes iconRes: Int, @ColorRes iconTint: Int): Drawable
open fun createOvalIcon(@NonNull context: Context, @ColorRes backgroundColor: Int, backgroundAlpha: Int, @DrawableRes iconRes: Int, @ColorRes iconTint: Int): Drawable
open fun createOvalIcon(@NonNull context: Context, @ColorRes backgroundColor: Int, backgroundAlpha: Int, @DrawableRes iconRes: Int, @ColorRes iconTint: Int, inset: Int): Drawable
Link copied to clipboard
open fun createOvalIconWithInset(@NonNull context: Context, @ColorRes background: Int, @DrawableRes iconRes: Int, @ColorRes iconTint: Int, inset: Int): Drawable
Link copied to clipboard
open fun createRoundedRectangle(radius: Float, color: Int): Drawable
Link copied to clipboard
open fun createRoundedSelector(selectedColor: Int, defaultColor: Int, radius: Int): StateListDrawable
Link copied to clipboard
Link copied to clipboard
open fun createTextColorSelector(selectedColor: Int, defaultColor: Int): ColorStateList
Link copied to clipboard
open fun setTintList(@Nullable drawable: Drawable, @Nullable colorStateList: ColorStateList): Drawable
open fun setTintList(@NonNull context: Context, @NonNull drawable: Drawable, colorRes: Int): Drawable
open fun setTintList(@NonNull context: Context, resId: Int, @Nullable colorStateList: ColorStateList): Drawable
open fun setTintList(@NonNull context: Context, resId: Int, colorRes: Int): Drawable
Link copied to clipboard
open fun toBitmap(@NonNull drawable: Drawable): Bitmap