Last active
March 28, 2018 07:57
-
-
Save takahirom/a133901ec6cad206a464bae7c9be1a5c to your computer and use it in GitHub Desktop.
NonNullObservableField for AGP 3.1 DataBinding and Kotlin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.databinding.ObservableField | |
class NonNullObservableField<T : Any>(value: T) : ObservableField<T>(value) { | |
override fun get(): T { | |
return super.get() as T | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment