yousuf.haque
11/29/2016, 5:01 PMtextView {
viewModel.gpsObservable.subscribe(text())
}
Where text() is an extension function on the textView object that you can get from the RXbinding library. It returns an action object with a string parameter that when called, sets the text on that view.
So simply subscribing to the view model observables with the corresponding action object from the view let's you get data binding.
If you don't wanna use RX, you could probably use the Observable delegate included in kotlin and you can pass a callback into the delegate but I think that's more work. I'll post a code sample when I have access to a computer