Created
April 29, 2016 02:25
-
-
Save juanchosaravia/cf7a114c5672a283345f145c79bfb722 to your computer and use it in GitHub Desktop.
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
inline fun <reified T : Parcelable> createParcel( | |
crossinline createFromParcel: (Parcel) -> T?): Parcelable.Creator<T> = | |
object : Parcelable.Creator<T> { | |
override fun createFromParcel(source: Parcel): T? = createFromParcel(source) | |
override fun newArray(size: Int): Array<out T?> = arrayOfNulls(size) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment