Skip to content

Instantly share code, notes, and snippets.

@furkanaskin
Created August 19, 2019 10:19
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 furkanaskin/112d486e78b88a2a73e5bc55db43f756 to your computer and use it in GitHub Desktop.
Save furkanaskin/112d486e78b88a2a73e5bc55db43f756 to your computer and use it in GitHub Desktop.
class PodcastFragment : BaseFragment<PodcastViewModel, FragmentPodcastBinding>(PodcastViewModel::class.java) {
private val podcastFragmentArgs: PodcastFragmentArgs by navArgs()
override fun init() {
super.init()
fun getData() {
viewModel.getEpisodes(podcastFragmentArgs.podcastID)
viewModel.podcastLiveData.observe(
viewLifecycleOwner,
Observer<Resource<Podcasts>> {
initAdapter()
}
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment