RichUtils / pyxis.uzuki.live.richutilskt.utils / android.content.Context / selector

selector

@JvmOverloads fun Context.selector(title: String? = "", items: List<CharSequence>, cancelable: Boolean = true, callback: (DialogInterface, Int) -> Unit): Builder

Display SelectorDialog instantly

Parameters

title - optional, title

items - list of display item

cancelable - able to cancel

callback - callback of click ok button

@JvmOverloads fun <T> Context.selector(title: String? = "", items: List<T>, cancelable: Boolean = true, callback: (DialogInterface, item: T, Int) -> Unit): Builder

Display SelectorDialog instantly

Parameters

title - optional, title

items - list of display item, working with generic. it will display item.toString()

cancelable - able to cancel

callback - callback of click ok button