Created
January 25, 2018 04:35
-
-
Save n8ebel/d5ef06895b3fe3476cd4e48bc31879e3 to your computer and use it in GitHub Desktop.
Definition of ViewModel lifecycle states that are handled by our BaseActivity
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
// Lifecycle States | |
sealed class ViewModelLifecycleState | |
object Active : ViewModelLifecycleState() | |
object FinishedOk : ViewModelLifecycleState() | |
object Cancelled : ViewModelLifecycleState() | |
data class FinishedWithResult( | |
val result:Int, | |
val data:Intent = Intent()) : ViewModelLifecycleState() | |
data class StartActivity( | |
val target:Class<out BaseActivity>, | |
val data:Intent = Intent()) : ViewModelLifecycleState() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment