Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val nameText = ObservableBoolean(nameHint) { it.isEmpty() }
- fun <T: Any> ObservableBoolean(o: ObservableField<T>, f:(T) -> Boolean): ObservableBoolean {
- return ObservableBoolean()
- .apply {
- o.observe {
- this.set(f(it!!))
- }
- }
- }
Add Comment
Please, Sign In to add comment