Skip to content

Instantly share code, notes, and snippets.

@Shahgupta4sq
Last active November 7, 2017 06:42
Show Gist options
  • Save Shahgupta4sq/e584b0f169db1d260656e405b75d7d6f to your computer and use it in GitHub Desktop.
Save Shahgupta4sq/e584b0f169db1d260656e405b75d7d6f to your computer and use it in GitHub Desktop.
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