InputCustom

class InputCustom(key: String? = null, func: InputCustom.() -> Unit) : Input

Input of a unknown type displayed in a custom view.

Constructors

Link copied to clipboard
fun InputCustom(key: String? = null, func: InputCustom.() -> Unit)

Functions

Link copied to clipboard
fun behavior(behavior: InputBehavior)
inline fun behavior(    crossinline onResult: () -> Unit = { },     crossinline onValidate: () -> Boolean = { true },     crossinline onSave: (bundle: Bundle, index: Int) -> Unit = { _, _ -> })

Set the behavior.

Link copied to clipboard
fun columns(columns: Int)

Set the amount of columns this input will span.

Link copied to clipboard
fun content(@StringRes contentRes: Int)
fun content(content: String)

Set the content text.

Link copied to clipboard
fun drawable(@DrawableRes drawableRes: Int)

Set a drawable.

Link copied to clipboard
fun fullView(fullView: Boolean)

The custom view will be take up the full space of the input and hide the label, content and icon.

Link copied to clipboard
open override fun invokeResultListener()

Invoke the result listener which returns the input value.

Link copied to clipboard
fun label(@StringRes labelRes: Int)
fun label(label: String)

Set the label text.

Link copied to clipboard
fun notifyInputDataChange()

Notify the validation process about the changed input data.

Link copied to clipboard
open override fun putValue(bundle: Bundle, index: Int)

Save the input value into the bundle. Takes the index as an key, if there's no unique input key available.

Link copied to clipboard
fun required(required: Boolean = true)

Require a value before the user can click the positive button.

Link copied to clipboard
open override fun valid(): Boolean

Check if the input value is valid.

Link copied to clipboard
fun view(view: View, listener: InputCustomViewListener? = null)
fun view(@LayoutRes layout: Int, listener: InputCustomViewListener? = null)

Set the view.

Link copied to clipboard
fun visible(visible: Boolean = true)

Set the initial visibility of the input.