Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
class ViewList<T : View?> : ArrayList<T>

Functions

Link copied to clipboard
fun getAttribute(context: Context, resId: Int): Int

Gets the value of an attribute with id resId.

Link copied to clipboard
fun getColor(context: Context, @ColorRes color: Int): Int
Link copied to clipboard
fun getColorFromAttribute(context: Context, @AttrRes attributeRes: Int): Int

Gets a color stored in attribute

Link copied to clipboard

Gets an attribute with id resId, and returns it as TypedValue.

Link copied to clipboard

Forces the MenuItem to be invisible.

fun View.hide(setGone: Boolean = true)

Sets the visibility of a view to gone

Link copied to clipboard
Link copied to clipboard
fun setTextColor(view: TextView, context: Context, @ColorRes color: Int)
Link copied to clipboard
fun setTextColorAttr(view: TextView, context: Context, @AttrRes color: Int)

Sets the text color of the view from the set attribute color.

Link copied to clipboard

Forces the MenuItem to be visible.

Sets the visibility of a view to visible

Link copied to clipboard
fun <T : View?> viewListOf(vararg views: T): ViewList<T>
Link copied to clipboard

Checks if a view is visible

Updates the visibility of the MenuItem to visible. Works as an alias for MenuItem.setVisible.

fun visibility(view: MenuItem, visible: Boolean, debug: Boolean = false)
fun visibility(view: Preference?, visible: Boolean, debug: Boolean = false)
fun <T : View?> visibility(views: ViewList<T>, visible: Boolean, setGone: Boolean = true, debug: Boolean = false)
fun visibility(view: View?, visible: Boolean, setGone: Boolean = true, debug: Boolean = false, clearAnimation: Boolean = true)

@JvmName(name = "visibility_own")
fun View.visibility(visible: Boolean, setGone: Boolean = true, debug: Boolean = false, clearAnimation: Boolean = true)

Sets the visibility of the view