Skip to content

Instantly share code, notes, and snippets.

@tonyjs
Created May 30, 2017 09:25
Show Gist options
  • Save tonyjs/f278e5e1dbbb8ba1334b0150d730f83a to your computer and use it in GitHub Desktop.
Save tonyjs/f278e5e1dbbb8ba1334b0150d730f83a to your computer and use it in GitHub Desktop.
LiveDataOwner.kt
interface LiveDataOwner {
fun getObservableData(): MutableLiveData<DataChangeInfo>
}
data class DataChangeInfo(val data: Any, val event: DataChangeEvent)
enum class DataChangeEvent {
NEW, UPDATE, DELETE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment