public final class ViewGroupUtil
extends java.lang.Object
ViewGroup
instances.Constructor and Description |
---|
ViewGroupUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
safeAddChild(java.lang.Object viewGroup,
java.lang.Object child)
Adds a child if it is not null and the
viewGroup is not null. |
static void |
safeAddChild(android.view.ViewGroup viewGroup,
java.lang.Object child)
Adds a child if the
child is not null and if the viewGroup does not contain the child . |
static void |
safeAddChild(android.view.ViewGroup viewGroup,
java.lang.Object child,
int index)
Adds a child at specified index if the
child is not null and if the viewGroup does not contain the child . |
static void |
safeRemoveChild(java.lang.Object viewGroup,
java.lang.Object child)
Removes a child if it is not null and the
viewGroup is not null. |
static void |
safeRemoveChild(android.view.ViewGroup viewGroup,
java.lang.Object child)
Remove a child if the
child is not null and if viewGroup contains the child |
public static void safeAddChild(android.view.ViewGroup viewGroup, java.lang.Object child)
child
is not null and if the viewGroup
does not contain the child
.viewGroup
- The ViewGroup
instance where child should be added.child
- The child to be added into the ViewGroup
.public static void safeAddChild(android.view.ViewGroup viewGroup, java.lang.Object child, int index)
child
is not null and if the viewGroup
does not contain the child
.viewGroup
- The ViewGroup
instance where child should be added.child
- The child to be added into the ViewGroup
.index
- The position at which to add the child.public static void safeRemoveChild(android.view.ViewGroup viewGroup, java.lang.Object child)
child
is not null and if viewGroup
contains the child
viewGroup
- The ViewGroup
instance from where child should be removed.child
- The child to be removed from the ViewGroup
.public static void safeAddChild(java.lang.Object viewGroup, java.lang.Object child)
viewGroup
is not null.viewGroup
- The ViewGroup
instance where child should be added.child
- The child to be added into the ViewGroup
.public static void safeRemoveChild(java.lang.Object viewGroup, java.lang.Object child)
viewGroup
is not null.viewGroup
- The ViewGroup
instance from where child should be removed.child
- The child to be removed from the ViewGroup
.