removeChild

open fun removeChild(child: View): Boolean(source)

Removes a child. If the child was not previously added to the node, calling this method has no effect.

Note: Cannot be called from an android.accessibilityservice.AccessibilityService. This class is made immutable before being delivered to an AccessibilityService.

Return

true if the child was present

Parameters

child

The child.

Throws

If called from an AccessibilityService.


open fun removeChild(root: View, virtualDescendantId: Int): Boolean(source)

Removes a virtual child which is a descendant of the given root. If the child was not previously added to the node, calling this method has no effect.

Return

true if the child was present

Parameters

root

The root of the virtual subtree.

virtualDescendantId

The id of the virtual child.

See also