justdvnsh/AnimeClassroom

Add a loading layout in the app

Opened this issue · 0 comments

Currently there is no loading visual feedback in the app. The user is not able to know if the data is being loaded. We need a new common loading layout in the app which we can include in any layout and it should work just fine. Try adding the layout based on live data, which would be controlled from the Common View Model. Currently, the navigation is being controller from the CommonViewModel. Similarly we can add a new live data which tells either the page is being loaded or not and controlled from the commonViewModel iteself. Remember to make it an Event, like

private val _loadingLiveData = MutableLiveData<Event(Boolean)>()

similar to the navigation live data.