-
- All Implemented Interfaces:
-
dev.teogor.ceres.components.app.BaseCommon,dev.teogor.ceres.core.logger.Logger
public class BaseViewModel extends ViewModel implements BaseCommon
-
-
Field Summary
Fields Modifier and Type Field Description private final MutableLiveData<ToolbarViewData>toolbarViewDataprivate final MutableLiveData<Boolean>showBottomNavigationprivate final SingleLiveEvent<NavDirections>navigateprivate final SingleLiveEvent<Boolean>onBackPressedprivate final SingleLiveEvent<Boolean>onThemeChangedprivate final SingleLiveEvent<UiEvent>uiEventStreamprivate final Resourcesresources
-
Constructor Summary
Constructors Constructor Description BaseViewModel()
-
Method Summary
Modifier and Type Method Description final MutableLiveData<ToolbarViewData>getToolbarViewData()UI Binding final MutableLiveData<Boolean>getShowBottomNavigation()final SingleLiveEvent<NavDirections>getNavigate()Activity Observables final SingleLiveEvent<Boolean>getOnBackPressed()final SingleLiveEvent<Boolean>getOnThemeChanged()final SingleLiveEvent<UiEvent>getUiEventStream()final ResourcesgetResources()UnitonActivityCreated()UnitonFragmentCreated()final UnitsetToolbarType(ToolbarType toolbarType)final UnitsetToolbarTitle(@StringRes() Integer titleStringId)final UnitshowBottomNavigation(Boolean showBottomNavigation)UnitonRefresh()-
Methods inherited from class dev.teogor.ceres.components.app.BaseViewModel
addCloseable, clear, getTag, onCleared, setTagIfAbsent -
Methods inherited from class dev.teogor.ceres.components.app.BaseCommon
log -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getToolbarViewData
final MutableLiveData<ToolbarViewData> getToolbarViewData()
UI Binding
-
getShowBottomNavigation
final MutableLiveData<Boolean> getShowBottomNavigation()
-
getNavigate
final SingleLiveEvent<NavDirections> getNavigate()
Activity Observables
-
getOnBackPressed
final SingleLiveEvent<Boolean> getOnBackPressed()
-
getOnThemeChanged
final SingleLiveEvent<Boolean> getOnThemeChanged()
-
getUiEventStream
final SingleLiveEvent<UiEvent> getUiEventStream()
-
getResources
final Resources getResources()
-
onActivityCreated
Unit onActivityCreated()
-
onFragmentCreated
Unit onFragmentCreated()
-
setToolbarType
final Unit setToolbarType(ToolbarType toolbarType)
-
setToolbarTitle
final Unit setToolbarTitle(@StringRes() Integer titleStringId)
-
showBottomNavigation
final Unit showBottomNavigation(Boolean showBottomNavigation)
-
-
-
-