removeFromParent

fun View.removeFromParent()

Removes a view from its parent. Does nothing if it's not attached to a ViewGroup parent.