Create file including custom Views
import android.view.View fun View.gone() { visibility = View.GONE } fun View.visible() { visibility = View.VISIBLE } fun View.isVisible(): Boolean = visibility == View.VISIBLE
Use custom View anywhere inside application
import sample.app.com.extension.gone import sample.app.com.extension.visible oneViewId?.gone() oneViewId?.visible()
Leave a Reply