VastVbActivity

abstract class VastVbActivity<VB : ViewBinding> : VastActivity

VastVbActivity.

If your Activity contains to 0 or more ViewModels, I recommend you use VastVbActivity.

Here is an example in kotlin:

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

Parameters

VB

ViewBinding of the activity layout.

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

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

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 onCreate(savedInstanceState: Bundle?)