Skip to content

Instantly share code, notes, and snippets.

@Shahgupta4sq
Last active November 7, 2017 06:42
private val status = SingleLiveEvent<Status>()
fun getStatus(): LiveData<Status> {
return status
}
fun handleImage(intent: Intent?) {
intent?.data?.let {
avatar.value = it.toString()
} ?: run { status.value = Status.INVALID_URI }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment