UiUtils

object UiUtils

Convenience class for UI related methods

Properties

Link copied to clipboard
const val DISMISS_DIALOG_TIME_MS: Long = 1000

Length value for the dialogs to be dismissed

Link copied to clipboard

Regex pattern for string to contain at least one uppercase and a digit value.

Functions

Link copied to clipboard
fun animateTextErrorTransition(tv: TextView, reverse: Boolean = false)

Animates text color transition from error state to normal. If reverse is set to true, then vice versa.

Link copied to clipboard
fun Snackbar.applyTheme(textSizeSp: Int = 14, centerText: Boolean = false)
Link copied to clipboard
fun View.onClick(l: () -> Any?)

Convenience method that substitutes the traditional setOnClickListener applied on Views

Link copied to clipboard
fun View.onTap(action: () -> Any?)

Convenience method that substitutes the traditional setOnClickListener applied on Views while applying a default throttler to be used between consecutive calls

fun View.onTap(throttler: Throttler, action: () -> Any?)

Convenience method that substitutes the traditional setOnClickListener applied on Views while applying a given throttler to be used between consecutive calls