Skip to content

Conversation

@Karakurik
Copy link
Owner

video_2021-11-19_23-47-48.mp4

fun updateData(newData: List<Planet>) {
val callback = PlanetDiffUtils(list, newData)
val diffResult = DiffUtil.calculateDiff(callback)
diffResult.dispatchUpdatesTo(this)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше через листадаптер, ну ладно

with(binding) {
tvName1.text = item.name
tvName2.text = item.name
tvNumberOfSatellite.text = "Количество спутников: ${item.numberOfSatellite}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше через strings.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants