class NewsViewModel : ViewModel
The NewsFragment's viewmodel.
Factory |
The NewsViewModel's factory class. class Factory : Factory |
<init> |
The NewsFragment's viewmodel. NewsViewModel(application: Application, symbol: String) |
errorAction |
Gets triggered if an error has been occurred. val errorAction: LiveData<Exception> |
news |
The news to show. val news: LiveData<List<News>> |
refreshing |
Indicates whether news are being fetched. val refreshing: LiveData<Boolean> |
onErrorActionCompleted |
Resets the error indicator. fun onErrorActionCompleted(): Unit |
refresh |
Fetch news. fun refresh(): Unit |