RecyclerView - Part 9, Supporting heterogeneous rows

  Рет қаралды 12,301

Codetutor

Codetutor

Күн бұрын

Пікірлер: 62
@shubhamnaik1982
@shubhamnaik1982 3 жыл бұрын
You are the Real Android App Developer Guide for the beginners 🙏
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 3 жыл бұрын
It's my pleasure!!. Hope you have subscribed
@shubhamnaik1982
@shubhamnaik1982 3 жыл бұрын
@@Codetutor-DemystifyCoding yes, of course , for your valuable android content
@babintandukar8917
@babintandukar8917 5 жыл бұрын
i cant do more than appreciate your teaching ..thank you such a nice explanation in 6 mins
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 5 жыл бұрын
Hey thanks.. Glad that you liked the content. Feel free to explore other videos, visit playlist section of channel to see curated content. Hope you have subscribed.
@skzafar9783
@skzafar9783 6 жыл бұрын
Awesome, Your Teaching Skill level is *Conqueror*
@clublulu399
@clublulu399 4 жыл бұрын
Very informative and well explained. Good stuff.
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 4 жыл бұрын
Glad that this could be of help to you. Hope you have subscribed. If you like something, feel free to share it with your friends and peers, they might too find it useful.
@emadeldin1999
@emadeldin1999 5 жыл бұрын
that's the best and simplest tutorial about this topic in youtube ! thank you very very very much bro u got one more subscriber from palestine
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 5 жыл бұрын
Glad that this was help to you. Feel free to explore other content on Channel. Visit playlist section of codetutor to have a look at other Android related concepts explained in detailed manner.
@emadeldin1999
@emadeldin1999 4 жыл бұрын
@@Codetutor-DemystifyCoding sure i will..but if i may ask you to make video about handling clicks in this kind of recyclers that would be very helpful !
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 4 жыл бұрын
I have already done that. It's part of this tutorial series. Please check out the whole series.
@duyhoang5334
@duyhoang5334 6 жыл бұрын
really nice video Sir, Practical . I keep watching your tutorial.
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 6 жыл бұрын
Thanks.. Help spread the word about the channel. Share the content your friends and peers. They too might find this useful just like you.
@fakhruddinezzey3479
@fakhruddinezzey3479 5 жыл бұрын
Thank you so much. It was really helpful and very lucid.
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 5 жыл бұрын
Hey thanks.. Glad that you liked the content. Feel free to explore other videos, visit playlist section of channel to see curated content. Hope you have subscribed.
@andrewparker7603
@andrewparker7603 6 жыл бұрын
Best video no this topic I could find. Thank you!
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 6 жыл бұрын
Thanks. Glad that you liked the content. Feel free to visit playlist section and explore other content on Codetutor. Hope you have subscribed.
@bilalsheikhkhalil6900
@bilalsheikhkhalil6900 4 жыл бұрын
Thanks, this is the best youtube channel.
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 4 жыл бұрын
Thanks for the kind words.. Feel free to explore other content on channel. Visit the playlist section. Hope you have subscribed.
@sherkofaraji8468
@sherkofaraji8468 5 жыл бұрын
Awesome , thanks
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 5 жыл бұрын
Hey thanks.. Glad that you liked the content. Feel free to explore other videos, visit playlist section of channel to see curated content. Hope you have subscribed.
@nurdauletanefiyayev4527
@nurdauletanefiyayev4527 6 жыл бұрын
I have trouble where I place an advertisement, my array misses every 3rd position (arrray[0], array[1], ad, array[3], array[4], ad, array[6] and so on...) How can I solve it?
@slash0t5
@slash0t5 5 жыл бұрын
This is an excellent video. However, you left out the part where you insert the advertisement image. How would you do that?
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 5 жыл бұрын
Thanks... I never had the intention of actually inserting an ad as focus here was to demonstrate heterogenous rows in a recyclerview. But adding an ad should not be a major problem. Typically it would be an image. It's just matter downloading the image and putting it in the ImageView (provided you have the imageview in side the row layout). Lot of libraries are there for doing this like picassa. Hope this has been helpful to you.
@slash0t5
@slash0t5 5 жыл бұрын
@@Codetutor-DemystifyCoding yes it was extremely helpful. I was using Firebase UI Firestore and had to rewrite the entire code because that library doesn't support heterogeneous view types. I ended up using Glide instead of Picasso and it works.
@thiennguyen-tv3ih
@thiennguyen-tv3ih 4 жыл бұрын
One word : WOW
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 4 жыл бұрын
Thanks for the kind words. Feel free to explore other content on channel - visit playlist section. Hope you have subscribed.
@vikashgauravvkg
@vikashgauravvkg 6 жыл бұрын
outstanding tutorial
@indrajeetjyoti9020
@indrajeetjyoti9020 7 жыл бұрын
Sir my question is that in Facebook or any news app first ten view or first ten position of recycler view is loaded after that some loading view show then again next ten data load in recycler view
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 7 жыл бұрын
Oh.. it's a combination of multiple things. First you need to create a endless RecyclerView. There is a way to do it. Basically you keep track of scrolling and when scroll reaches a point you add more row items to RecyclerView. Also you need to load the as late as possible to make this as efficient as possible. You need to use the concept of lazy loading for this. Also you need to cache data to make it perform better. These are very interesting but bit advanced concepts and I am not covering those as of now. This should be good enough hint for you to search on other forums. All the best.
@mubin986
@mubin986 5 жыл бұрын
good explanation. but, if you used generic recyclerview adapter and generate viewholders with factory method pattern, your code would become smaller and reusable for future use. thank you.
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 5 жыл бұрын
Of course.. in a real production quality code, I would do that. This was meant for beginners. Thanks for commenting.
@AjayTiwari-rk7cv
@AjayTiwari-rk7cv 6 жыл бұрын
nice article sir
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 6 жыл бұрын
Thanks.. Glad that you liked the content.. Please visit playlist section of the channel to see other content.. Hope you have subscribed...
@milanmandani39
@milanmandani39 6 жыл бұрын
Nice Tutorial Sir It Worked Perfectly in Linearlayout manager .. I tried it in Recyclerview with GridlayoutManager ( 3 column ) but its not work perfectly ... So How Can we Do It,,..??
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 6 жыл бұрын
Are you getting an exception or is it just that data in layout not getting displayed properly? If you are getting the exception - Did you debug it? What Exception is it giving? Did you do Google search on that exception? If it is just a unaligned display issue - you will have to just redesign layouts for row items to accommodate large data in smaller area (play with font sizes, widths and heights). Hope this helps.
@mydentaldocketappteam7831
@mydentaldocketappteam7831 5 жыл бұрын
Thank you
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 5 жыл бұрын
No problem, glad that you found the content useful. Feel free to explore other Android related content on Codetutor. Visit the playlist section.
@josephjoey3904
@josephjoey3904 7 жыл бұрын
Sir how to set click listeners for items in each row and start separate activity for each item. Thanks
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 7 жыл бұрын
Click evens on Row items in RecyclerView has been explained in one of previous videos in this series. Please visit: kzbin.info/www/bejne/n3fQi6mdp8hnn5I Starting an Activity from there should be straight forward. If you want to know general concept of how Activity is triggered, I have a another tutorial series. Pleas visit: kzbin.info/www/bejne/habHaqOpm7eJorc
@siphamandlagcabashe5169
@siphamandlagcabashe5169 6 жыл бұрын
Hello Sir, How can i decide the view to be displayed based on something retrieved from the database?
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 6 жыл бұрын
Yes.. This is very common scenario... Instead of Two (as shown in demo) you need to design for more options. That's all. Complexity increases.. but still works perfectly fine.
@kaboomstudios8416
@kaboomstudios8416 6 жыл бұрын
do you have any video on this
@babintandukar8917
@babintandukar8917 5 жыл бұрын
i hope it helps to futeure who come across this prob i achieved it by infalting layout on based of boolean which i get from my list.. Model model = list.get(position); if(model.getboolean){ return whentrue layout }else{ return whenfalselayout }
@vishalkumarsonawane7334
@vishalkumarsonawane7334 5 жыл бұрын
Very nice tutorial. You taught a very deep concept of android. Please, can you help me to build logic to display 4 heterogenous vies in recycler view. Each view item repeats after 3 different items.
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 5 жыл бұрын
I am almost tempted to give answer but I will hold back.. You can do it by just changing the logic in getItemViewType. I have already shown how to do it one one scenario. It's just matter of figuring out what logic should be in place for your scenario. Just download this code from Github, debug it and modify it to get what you want. I am pretty sure you will figure this out on your own. Best of luck.
@ideepdave
@ideepdave 6 жыл бұрын
Issue i guess is with dataList,size(); where we have to add equal number of items of adviews.
@jrProfessorRider
@jrProfessorRider 3 жыл бұрын
How to remove all data from recyclerview and insert new data
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 3 жыл бұрын
Just clear the List and invoke notifyDataSetChanged on the adapter. That should do it.
@eddykwang
@eddykwang 6 жыл бұрын
Databing with event handling for Recyclerview pls!!! thank you.
@indrajeetjyoti9020
@indrajeetjyoti9020 7 жыл бұрын
Nice Sir update this tutorial!but how we load data from recycler view every 10th position
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 7 жыл бұрын
Oh.. looks like you were waiting for this video.. You got to modify getItemViewType. I have used modulo 3 operation. If you want to change this you need to change that internal logic of getItemViewType. Actually at the end of this video I have said that there is issue with this implementation. Try to figure out what is it. I will be unravelling it in next video.
@anggitprayogo6436
@anggitprayogo6436 6 жыл бұрын
hi can i ask you directly to email?
@Codetutor-DemystifyCoding
@Codetutor-DemystifyCoding 6 жыл бұрын
Please don't mail me. I can't keep answering similar questions from different people individually via mails - it's just inefficient. Any doubts regarding video and concept, put them in comment section. If I answer them, that will help others as well.
@anggitprayogo6436
@anggitprayogo6436 6 жыл бұрын
okey, the concept is almost similar. i want to show ads in every 5 items in recyclerview. but i have 2 diffrent source data that i store in list to show news response and ads response from api. how to handle that 2 diffrent list in recyclerview adapter to show ads in every 5 item of news?
RecyclerView - Part 10, The Finale
7:12
Codetutor
Рет қаралды 4,3 М.
HELP!!!
00:46
Natan por Aí
Рет қаралды 48 МЛН
Heterogeneous RecyclerView (Vertical and Horizontal display)
22:42
Bamidele Oguntuga
Рет қаралды 30 М.
Swipe gestures in Recycler View | Android
18:47
Mafia Codes
Рет қаралды 62 М.
RecyclerView OnClickListener (Best practice way)
11:48
CodingWithMitch
Рет қаралды 292 М.
Android RecyclerView and CardView Tutorial
20:23
Simplified Coding
Рет қаралды 155 М.
Filter RecyclerView using Search View | Android
11:54
Mafia Codes
Рет қаралды 118 М.
AMD Ryzen 7 9800X3D Review - Hail to the Chief
19:57
KitGuruTech
Рет қаралды 69 М.
HELP!!!
00:46
Natan por Aí
Рет қаралды 48 МЛН