Last active
December 27, 2018 10:01
-
-
Save AdiD253/846581cd7ceb39f656bb054b5ebc6013 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
class SampleAdapter : RecyclerView.Adapter<SampleViewHolder>() { | |
private var itemList: List<SampleItem> by Delegates.observable(initialValue = listOf(), onChange = { property, oldValue, newValue -> | |
autoNotify(oldValue, newValue) | |
}) | |
fun setItems(itemList: List<SampleItem>) { | |
this.itemList = itemList | |
} | |
(...) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment