core-ktx / androidx.view / android.view.View / isGone

isGone

inline var View.isGone: Boolean

Returns true when this view's visibility is View.GONE, false otherwise.

if (view.isGone) {
    // Behavior...
}

Setting this property to true sets the visibility to View.GONE, false to View.VISIBLE.

view.isGone = true