setVisibleIfNot

fun View.setVisibleIfNot(condition: Boolean?)

Sets the visibility of the View based on whether the condition is satisfied. If the condition is unsatisfied (false) or null, the visibility is set to View.VISIBLE. Otherwise, it is set to View.GONE.

This adapter allows replacing

<View
android:visibility="@{viewModel.condition ? View.GONE : View.VISIBLE}" />

with

<View
auto:visibleIfNot="@{viewModel.condition}" />