Package-level declarations

Types

Link copied to clipboard

Views layout params tool.

Properties

Link copied to clipboard

Get the text view's ellipsize status.

Link copied to clipboard

Get or set the text view's strike through style.

Link copied to clipboard

Get or set the text view's underline style.

Link copied to clipboard

Get the layout inflater from context.

Link copied to clipboard

Get the view's location on screen.

Link copied to clipboard

Get or set the text view's text color.

Functions

Link copied to clipboard
inline fun <V : View> ViewGroup.child(index: Int): V

Get the view V by index in its parent view.

Link copied to clipboard
inline fun <V : View> ViewGroup.childOrNull(index: Int): V?

Get the view V by index in its parent view.

Link copied to clipboard

Clear the text view's text.

Link copied to clipboard
inline fun <V : View> ViewGroup.firstChild(): V

Get the first child view V in its parent view.

Link copied to clipboard
inline fun <V : View> ViewGroup.firstChildOrNull(): V?

Get the first child view V in its parent view.

Link copied to clipboard

Hide the input method.

Link copied to clipboard

Disappear the soft input.

Link copied to clipboard

Get the view's index in its parent view.

Link copied to clipboard
fun ViewGroup.inflate(resId: Int, attachToRoot: Boolean = false): View
@JvmName(name = "inflateTyped")
inline fun <V : View> ViewGroup.inflate(resId: Int, attachToRoot: Boolean = false): V
fun Context.inflate(resId: Int, parent: ViewGroup? = null, attachToRoot: Boolean = false): View
@JvmName(name = "inflateTyped")
inline fun <V : View> Context.inflate(resId: Int, parent: ViewGroup? = null, attachToRoot: Boolean = false): V

Inflate a view using resId.

@JvmName(name = "inflateTyped")
inline fun <V : View> LayoutInflater.inflate(@LayoutRes resource: Int, root: ViewGroup? = null, attachToRoot: Boolean = false): V
fun LayoutInflater.inflate(@LayoutRes resource: Int, root: ViewGroup? = null, attachToRoot: Boolean = false): View

Extension for LayoutInflater.inflate.

Link copied to clipboard
@JvmName(name = "inflateOrNullTyped")
inline fun <V : View> LayoutInflater.inflateOrNull(@LayoutRes resource: Int, root: ViewGroup? = null, attachToRoot: Boolean = false): V?
fun LayoutInflater.inflateOrNull(@LayoutRes resource: Int, root: ViewGroup? = null, attachToRoot: Boolean = false): View?

Extension for LayoutInflater.inflate.

Link copied to clipboard
inline fun <V : View> ViewGroup.lastChild(): V

Get the last child view V in its parent view.

Link copied to clipboard
inline fun <V : View> ViewGroup.lastChildOrNull(): V?

Get the last child view V in its parent view.

Link copied to clipboard
inline fun <V : View> V.outlineProvider(crossinline provider: (view: V, outline: Outline) -> Unit)

Set the view's outline provider.

Link copied to clipboard
@JvmName(name = "parentTyped")
inline fun <VG : ViewGroup> View.parent(): VG

Get the view's parent view VG.

Get the view's parent view.

Link copied to clipboard
@JvmName(name = "parentOrNullTyped")
inline fun <VG : ViewGroup> View.parentOrNull(): VG?

Get the view's parent view VG.

Get the view's parent view.

Link copied to clipboard
fun View.performKeyPressed(keyCode: Int, duration: Long = 150)

Simulate the key down and up events.

Link copied to clipboard
fun View.performTouch(downX: Float, downY: Float, upX: Float, upY: Float, duration: Long)

Simulate the touch events.

Link copied to clipboard

Remove self from its parent view using ViewGroup.removeView.

Link copied to clipboard

Remove self from its parent view using ViewGroup.removeViewInLayout.

Link copied to clipboard
fun TextView.setDigits(acceptedChars: String, inputType: Int = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_NORMAL, locale: Locale = Locale.ROOT)

Set the text view's digits.

Link copied to clipboard

Show the input method.

Link copied to clipboard

Show the soft input.

Link copied to clipboard
@JvmName(name = "showToast")
fun Dialog.toast(message: CharSequence, duration: Int = Toast.LENGTH_SHORT, allowBackground: Boolean = false)

Show a Toast with Dialog.

@JvmName(name = "showToast")
fun Context.toast(message: CharSequence, duration: Int = Toast.LENGTH_SHORT, allowBackground: Boolean = false)

Show a Toast with Context.

@JvmName(name = "showToast")
fun View.toast(message: CharSequence, duration: Int = Toast.LENGTH_SHORT, allowBackground: Boolean = false)

Show a Toast with View.

@JvmName(name = "showToast")
fun Window.toast(message: CharSequence, duration: Int = Toast.LENGTH_SHORT, allowBackground: Boolean = false)

Show a Toast with Window.

@JvmName(name = "showToast")
fun Fragment.toast(message: CharSequence, duration: Int = Toast.LENGTH_SHORT, allowBackground: Boolean = false)

Show a Toast with Fragment.

Link copied to clipboard
fun TextView.updateCompoundDrawables(left: Drawable? = compoundDrawables[0], top: Drawable? = compoundDrawables[1], right: Drawable? = compoundDrawables[2], bottom: Drawable? = compoundDrawables[3])

Update the text view's compound drawables.

fun TextView.updateCompoundDrawablesWithIntrinsicBounds(left: Drawable? = compoundDrawables[0], top: Drawable? = compoundDrawables[1], right: Drawable? = compoundDrawables[2], bottom: Drawable? = compoundDrawables[3])

Update the text view's compound drawables with intrinsic bounds.

Link copied to clipboard

Update window's attributes.

Link copied to clipboard
@JvmName(name = "updateHVMargin")
fun View.updateMargin(@Px horizontal: Int = -1, @Px vertical: Int = -1)

Updates this view's horizontal or vertical margin.

fun View.updateMargin(@Px left: Int = marginLeft, @Px top: Int = marginTop, @Px right: Int = marginRight, @Px bottom: Int = marginBottom)

Updates this view's margin.

Link copied to clipboard
fun View.updatePadding(@Px horizontal: Int = -1, @Px vertical: Int = -1)

Updates this view's horizontal or vertical padding.

Link copied to clipboard

Update the edit text's text and set the cursor to the end.

Link copied to clipboard
fun TextView.updateTypeface(style: Int, tf: Typeface? = typeface)

Update the text view's typeface.

Link copied to clipboard
inline fun <VGLP : ViewGroup.LayoutParams> ViewLayoutParams(@Px width: Int = LayoutParamsUnspecified, @Px height: Int = LayoutParamsUnspecified, matchParent: Boolean = false, widthMatchParent: Boolean = false, heightMatchParent: Boolean = false): VGLP
Link copied to clipboard

Walk through the view's children views.

Link copied to clipboard

Walk to the view's parent views.