RecyclerView Performance with DiffUtil (Kotlin)

RecyclerView Performance with DiffUtil (Kotlin)

CodingWithMitch

5 лет назад

23,882 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@mubin986
@mubin986 - 10.09.2019 06:27

Very helpful

Ответить
@diydeveloper214
@diydeveloper214 - 10.09.2019 06:58

you are using kotlin data class which has equality check out of the box. No need to check every individual field

Ответить
@emmanuelonwumah915
@emmanuelonwumah915 - 10.09.2019 07:57

So happy you’re posting more frequently these day like you did back in the day. Also love that you’re using all the new stuff, jetpack, coroutines, nav etc. I remember back when you used to do everything in the activity class and name all your variables starting with “m” 😂

Ответить
@emmanuelonwumah915
@emmanuelonwumah915 - 10.09.2019 08:20

Hey Mitch did you build your website yourself?

Ответить
@MrRahulmalik
@MrRahulmalik - 10.09.2019 08:21

Can i use this with Firebase Recycler Adapter?

Ответить
@srjlove2102
@srjlove2102 - 10.09.2019 08:51

Simple, & Understandable

Ответить
@VishalSingh-eb4zc
@VishalSingh-eb4zc - 10.09.2019 09:38

Hello Mitch please use android studio dark mode i watching your video at night and white theme is problem watching at night Please

Ответить
@codinginflow
@codinginflow - 10.09.2019 09:39

ListViews hate this one weird trick

Ответить
@GakisStylianos
@GakisStylianos - 10.09.2019 10:01

Wait is the MVI course already done? That means you are slowly going to start releasing parts of the powerful android app right?

Ответить
@nasim7199
@nasim7199 - 10.09.2019 13:11

Hey i have added a recyclerview in a fragment which is in a bottom navigation it becomes super slow when i add admob ads between them. How can i make it faster.

Ответить
@mohamedsul1
@mohamedsul1 - 10.09.2019 17:31

I Liked It , It's So Simple And Awesome Explanation
Enjoyed a lot
Thanks Mitch

Ответить
@عربيانسان
@عربيانسان - 10.09.2019 22:16

whats about the java and android studio !

Ответить
@RivaldoChristian
@RivaldoChristian - 11.09.2019 01:48

It's simple and easy to understand, thank for this video.

Ответить
@simonpeterojok2291
@simonpeterojok2291 - 13.09.2019 12:15

i really hate the way u teach, i have been watching ur video for data binding on plurasight and i was really un happy the way u made us to copy codes and load different versions of the same project, i recommend my be u show us how to update the current project to be compartible with ur new project's module. I really like Jim Wills courses at plurasight, please work around this, remember android studio takes time loading a new project. Please work around that, otherwise u are a best teacher

Ответить
@simonpeterojok2291
@simonpeterojok2291 - 13.09.2019 12:20

i actually don't recommend anyone for ur courses. Please remember that we take ur courses because u don't know and really want to know, please take time and make us know because we are paying our money we worked for for such course. Be like jim wills on plurasight. let me try other courses of yours at plurasight and learn more about android

Ответить
@Gabbitt0
@Gabbitt0 - 14.09.2019 08:15

Thanks for your tutorial. Now the issue am having is that, I am fetching data from room db. When I'm using livedata to observe and update new items or change the order of my items (eg from order by id to Order by name) the focus of the new items starts from the position of the item I was previously viewing before changing the order, whereby I have to manually scroll to the top in order to see the first item. How do make my new updated list starts the focus from top of the RecyclerView. Thanks allot.

Ответить
@pankrawat9
@pankrawat9 - 08.10.2019 21:48

hey how can we use this in groupie adapter

Ответить
@9980500125
@9980500125 - 10.11.2019 11:15

in arecontentsame method we can compare the 'data class' object by using == right??

Ответить
@sanaebadi97
@sanaebadi97 - 11.11.2019 12:44

we can use Material dependency. it has recyclerView too, right ?!


override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
return (oldBlogList[oldItemPosition].pk == newBlogList[newItemPosition].pk)

}

override fun getOldListSize() = oldBlogList.size

override fun getNewListSize() = newBlogList.size


override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
return oldBlogList[oldItemPosition] == newBlogList[newItemPosition]
}

}



we can use like this too

Ответить
@sudhanshusharma9159
@sudhanshusharma9159 - 30.12.2019 09:50

Hi Mitch, If we have more than one list as pert of adapter. how to handle that. e.g if i have list of urls and list of names.
thanks.

Ответить
@JewelRana-qc6vs
@JewelRana-qc6vs - 09.02.2020 12:59

It is a very useful tutorial. How to use DiffUtil in the groupie library. Thank you for your tutorial.

Ответить
@germainkevin5987
@germainkevin5987 - 13.04.2020 16:00

You should make an app for your website that can have like a sololearn experience where you display the codes in a tabbed activity for each course. Like that we would get access to older courses, upcoming courses with the codes displayed in a tabbed activity with like 3-4 sections such as Dependency tab, Xml tab, Java tab etc...

Ответить
@karuneshpalekar5212
@karuneshpalekar5212 - 18.04.2020 13:38

How to make sure it's working the right way ? Is there testing available for the following?

Ответить
@damiansauren3191
@damiansauren3191 - 23.04.2020 17:15

Could've showed us how to use it atleast

Ответить
@mattwalkgaming2626
@mattwalkgaming2626 - 12.05.2020 09:14

Hey Mitch, I have to ask If we have two Recyclerviews say (Horizontal and Vertical) in same layout.Then Do we have to create 4 Diffutil class in our adapters, two in Main Adapter (Because we have two different types of list for each child Recyclereview ) and each one in child adapter ??

Ответить
@convextechinc.8258
@convextechinc.8258 - 30.05.2020 12:26

Thanks bro !

Ответить
@RahulSharma-es9uv
@RahulSharma-es9uv - 30.05.2020 21:39

How to create pagination through scroll listener in recycler view

Ответить
@randy4443
@randy4443 - 30.06.2020 05:04

Amazing work! Do you code reviews? I am about to launch an app but I want to someone to review it.

Ответить
@randy4443
@randy4443 - 30.06.2020 05:21

In Kotlin it states Call replaceable with binary operator and wants me to replace the equals method with == operator. This is just a warning and not an error but I am wondering if its a good idea to do what it says.

Ответить
@ranco801
@ranco801 - 09.07.2020 12:47

Thank you for the great lecture. But i was LOL when you said google did good job on the documentation. Google documentation is the worst...

Ответить
@girishak9404
@girishak9404 - 22.07.2020 11:46

Many Thanks Mitch

Ответить
@arjanmundy
@arjanmundy - 24.07.2020 07:39

Hidden Treasure!!!

Ответить
@mahmoudmabrouk7770
@mahmoudmabrouk7770 - 12.10.2020 15:33

I think reassign "items" with new list is not
the best practice, it should be same reference

Ответить
@TheRajmoney
@TheRajmoney - 08.11.2020 22:00

great video

Ответить
@imeepineda8207
@imeepineda8207 - 14.01.2021 15:49

mich how can i sort a data after diffutil analyze it

Ответить
@QumberAbbas
@QumberAbbas - 13.02.2021 16:44

Why did you override equals method despite using data class?

Ответить
@MMB3245
@MMB3245 - 13.05.2021 05:59

Hey Mitch, noob here. Great vid as always. Many thanks.

Ответить
@germanmontejo22
@germanmontejo22 - 28.05.2021 07:50

The data class already has a default equals() implementation. I don't know why you still created your own implementation for it. Also, you can just extend DiffUtil.ItemCallback. Since you really only need areContentsTheSame() and areItemsTheSame().

Ответить
@marcinbiaecki9731
@marcinbiaecki9731 - 28.05.2021 20:17

Thank you :)

Ответить
@nazaninbalasi8705
@nazaninbalasi8705 - 09.11.2021 11:37

You are awesome . Thanks for your tutorial

Ответить
@etelot
@etelot - 31.01.2022 03:49

Awesome man! Why do you have the toString fun in the data class? It is already given to you.

Ответить
@danju132
@danju132 - 06.02.2022 09:38

Thanks Mitch

Ответить
@jonathancheli5842
@jonathancheli5842 - 08.03.2022 17:14

Mitch ..but what about you want to change the size the list...from the UI, without DiffUtil is easier with getItemCount .. but how to do it with DIffUtil??

thank u in advance man..your channel rocks!!!

Ответить
@anaskhalil4057
@anaskhalil4057 - 30.09.2022 20:39

very good video 🤓

Ответить
@harshagarwal00
@harshagarwal00 - 09.01.2023 19:35

Hey @Mitch,
Tried this got confused bcse when i update only one item, still bind gets called for each item in the list. I was expecting only one item to get rebinded to UI

Ответить
@mubaraknative
@mubaraknative - 31.07.2023 16:18

One subscription added by watching this Video!!😍😍

Ответить