fun ViewGroup.children(): Iterable<View>
|
|
fun ViewGroup.clear(): Unit
Same as ViewGroup.removeAllViews. |
|
fun ViewGroup.collapseIfEmpty(): Unit
Sets receiver's visibility to View.GONE if receiver has no children; sets it to View.VISIBLE otherwise. |
|
fun <T : View> ViewGroup.firstChild(): T
Returns first child as type T. |
|
fun <T : View> ViewGroup.firstChildOrNull(): T?
Returns first child as type T if available, null if the ViewGroup has no children, or if the child isn't of the expected type. |
|
operator fun ViewGroup.get(index: Int): View
Returns child view at specified index. |
|
fun ViewGroup.getOrNull(index: Int): View?
Returns child view at specified index. |
|
fun ViewGroup.hideIfEmpty(): Unit
Sets receiver's visibility to View.INVISIBLE if receiver has no children; sets it to View.VISIBLE otherwise. |
|
fun ViewGroup.inflate(layoutId: Int, attachToRoot: Boolean = false): View
Inflates a (child) view using LayoutInflater obtained with the view's context. |
|
val ViewGroup.isEmpty: Boolean
Returns true if the ViewGroup has no children. |
|
val ViewGroup.isNotEmpty: Boolean
Returns true if the ViewGroup has children. |
|
operator fun ViewGroup.minusAssign(view: View): Unit
Removes child view from the receiver. |
|
operator fun ViewGroup.plusAssign(view: View): Unit
Adds a child view to the receiver. operator fun ViewGroup.plusAssign(views: Iterable<View>): Unit
Adds child views to the receiver, in the original order. |
|
val ViewGroup.size: Int
Same as ViewGroup.getChildCount. |