Package io.mimi.sdk.ux.util

Types

Link copied to clipboard
class ActivityIndicator(    val imageView: LottieAnimationView,     @RawRes runningResId: Int = R.raw.mimi_lot_load,     @RawRes successResId: Int = R.raw.mimi_lot_check,     @RawRes failureResId: Int = R.raw.mimi_lot_cross)

Takes an ImageView and animates the corresponding vector drawable for the current State.

Link copied to clipboard
object BrowserTab
Link copied to clipboard
class TextWatcherAdapter(afterChanged: (Editable) -> Unit) : TextWatcher

Convenience class used to apply changes upon edit text change

Link copied to clipboard
class Throttler(interval: Int = 1000)

Convenience class to restrict the execution of an invoked action until a certain interval of time hasn't been elapsed

Link copied to clipboard
object UiUtils

Convenience class for UI related methods

Link copied to clipboard
class WeakRef<T>(initial: T? = null)

Convenience class to be used when in need for a weak reference to an object

Functions

Link copied to clipboard
fun Activity.applyThemeFromIntent()

Sets the theme to the current activity

Link copied to clipboard
fun Context.colorForAttribute(@AttrRes attr: Int): Int

Convenience method that resolves a given attribute resource into a color resource

Link copied to clipboard
fun Date.formatDefaultDate(): String
Link copied to clipboard
fun Context.getScreenWidthDp(): Int
Link copied to clipboard
fun intentWithTheme(activity: Activity, cls: KClass<out Any>): Intent

Creates and returns an intent to the specified themed activity

Link copied to clipboard
fun BottomSheetDialog.makeContentFullyDisplayed()

Force the Bottom Dialog have same high as its content

Link copied to clipboard
fun openBrowser(context: Context, url: String)

Opens the device browser with the specified context and url

Link copied to clipboard
fun Context.openDefaultEmailApp(onSuccess: () -> Unit? = null)

Opens the default email app

Link copied to clipboard
fun openEmail(    ctx: Context,     mailto: String,     subject: String,     body: String)

Opens the default email client with the specified fields already filled

Link copied to clipboard
fun Context.resourceIdForAttribute(@AttrRes attr: Int): Int

Convenience method that resolves a given attribute resource into a resource id

Link copied to clipboard
fun String.toUri(): Uri

Properties

Link copied to clipboard
val Int.dp: Int
Link copied to clipboard
val Int.px: Int