In my application I want to hide data fetching at the start from the user. As I already read I should do this with the usage of themes. I have created new theme, setted everything and... I'm stuck.
My app is based on MVVM architecture and basically I have only one activity which has FragmentContainerView
in which I am changing the fragments. So in the manifest file I already have this splash screen theme and as far as I know, I should change the theme when data is fetched. But how to do it? Should I instantiate ViewModel in activity, call refresh (this method fetches the data), and observe some LiveData to know if data has been fetched and if yes then change theme?
Tried to find some instructions/tutorials about this but haven't found anything useful. Will be grateful for any tips or tutorials from which I can learn.
Thanks!