Created
November 3, 2020 11:14
-
-
Save emrekose26/ef9e7dcefa4ff6f232630f842cbc778b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adapter.addLoadStateListener { combinedLoadStates -> | |
when (val loadState = combinedLoadStates.source.refresh) { | |
is LoadState.NotLoading -> { | |
popular_movies_refresh_layout.visible() | |
popular_movies_progress.gone() | |
} | |
is LoadState.Loading -> { | |
popular_movies_progress.visible() | |
popular_movies_refresh_layout.gone() | |
} | |
is LoadState.Error -> { | |
Timber.e(loadState.error.localizedMessage) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment