Skip to content

Instantly share code, notes, and snippets.

@walnashgit
Created May 8, 2021 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walnashgit/d008fe069034534bc7e95aa003badf8d to your computer and use it in GitHub Desktop.
Save walnashgit/d008fe069034534bc7e95aa003badf8d to your computer and use it in GitHub Desktop.
class MainViewModel : ViewModel() {
private val _currentScreen = MutableLiveData<Screens>(Screens.DrawerScreens.Home)
val currentScreen: LiveData<Screens> = _currentScreen
fun setCurrentScreen(screen: Screens) {
_currentScreen.value = screen
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment