Last active
January 16, 2018 15:34
-
-
Save pokk/f713b728802a32c96e943a7409c48a6a to your computer and use it in GitHub Desktop.
the adapter was fixed.
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
artistAdapter = ArtistAdapter(this@ChartIndexFragment, R.layout.item_artist_type_1, artistRes) { holder, item, _ -> | |
// If a ViewModel doesn't exist, I will create a ViewModel. | |
if (null == holder.binding.avm) | |
holder.binding.avm = RecyclerViewSearchArtistChartViewModel(item) | |
// Otherwise, I just reset the data to the ViewModel. | |
else | |
holder.binding.avm?.setArtistItem(item) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment