-
Notifications
You must be signed in to change notification settings - Fork 3
One Way Bind
paulocns edited this page Mar 14, 2019
·
1 revision
Inside a LifeCycleOwner to perform a one way bind just call the method bind
bind(queryViewModelArc.searchEnabled, searchButton::setEnabled)
bind(queryViewModelArc.showLoading){ loadinLayout.present = it}
The bind method is an extension function for LifeCycleOwner and it takes two parameters:
- A LiveData of any type
- A function that receives one parameter with the same type as the LiveData