Skip to content

Instantly share code, notes, and snippets.

@DivS-15
Created May 22, 2022 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DivS-15/58106d2cedc3773d04ae5fbe5f5c3190 to your computer and use it in GitHub Desktop.
Save DivS-15/58106d2cedc3773d04ae5fbe5f5c3190 to your computer and use it in GitHub Desktop.
class VideoLoadStateAdapter(private val retry: () -> Unit) : LoadStateAdapter<VideoLoadStateViewHolder>() {
override fun onBindViewHolder(holder: VideoLoadStateViewHolder, loadState: LoadState) {
holder.bind(loadState)
}
override fun onCreateViewHolder(
parent: ViewGroup,
loadState: LoadState
): VideoLoadStateViewHolder {
return VideoLoadStateViewHolder.create(parent, retry)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment