VastVbVmActivity

abstract class VastVbVmActivity<VB : ViewBinding, VM : ViewModel> : VastActivity

VastVbVmActivity.

class MainActivity : VastVbVmActivity<ActivityMainBinding,MainViewModel>() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Something to do
}
}

Parameters

VB

ViewBinding of the activity layout.

VM

ViewModel of the activity.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
private val mBinding: VB
Link copied to clipboard
private var mSnackbar: Snackbar
Link copied to clipboard
private val mViewModel: VM

Functions

Link copied to clipboard
protected open override fun getBinding(): VB

Get the ViewBinding. By default, it will throw a IllegalStateException.

Link copied to clipboard
protected open override fun getSnackbar(): Snackbar

Get default Snackbar for activity.

Link copied to clipboard
protected open override fun getViewModel(): VM

Get the ViewModel. By default, it will throw a IllegalStateException.

Link copied to clipboard
protected open override fun onCreate(savedInstanceState: Bundle?)