Multi view RecyclerView | getItemViewType() | Android

  Рет қаралды 38,748

Mafia Codes

Mafia Codes

Күн бұрын

n this video you will learn how to implement multi view recycler view using the getItemViewType() method.
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! www.kite.com/get-kite/?...
FREE $100 credit @Digital Ocean: m.do.co/c/3208f08b3324
Patreon: / trulymittal
Subscribe: kzfaq.info...
Github(Tutorial): github.com/trulymittal/Recycl...
RecyclerView: developer.android.com/guide/t...
RecyclerView(dependency): developer.android.com/guide/t...
---------------
RecyclerView videos
---------------
#RecyclerView (Basic Setup): • Recycler View with com...
Pull to Refresh in Recycler View: • Pull to Refresh in Rec...
On item click using Interface: • RecyclerView item Clic...
Swipe gestures in Recycler View: • Swipe gestures in Recy...
Drag and drop Reorder in Recycler View: • Drag and drop Reorder ...
Filter using SearchView: • Filter RecyclerView us...
---------------
More useful videos
---------------
#ViewModel: • View Model | Live Data...
#Retrofit: • RETROFIT Tutorial (v 2...
#WorkManager: • Work Manager | Android...
#KeyframeAnimations: • Keyframe Animations wi...
#CollapsingToolbar Layout: • Collapsing Toolbar Lay...
#BottomNavigation View: • Bottom Navigation View...
#NavigationComponent: • Navigation Component |...
#NightMode: • Night Mode | Dark Mode...
#ButterKnife: • Butter Knife | Field a...
SplashScreen: • Splash screen | Launch...
Singletons: • Singletons | What When...
---------------
What I use
---------------
Mouse: amzn.to/2O9RJtu
Keyboard: amzn.to/2qxajCU
Keyboard 2: amzn.to/2XDWH4X
Monitor: amzn.to/2pDg7dH
Processor: amzn.to/347WWIb
RAM: amzn.to/2QEkUqw
Graphics: amzn.to/33aBrF4
Microphone: amzn.to/2DabdI9
#yoursTruly #tutorial #how-to #android

Пікірлер: 95
@chelseakatsidzira7153
@chelseakatsidzira7153 4 жыл бұрын
Great tutorial! Everything's working perfectly
@mafiacodes
@mafiacodes 4 жыл бұрын
Subscribe like share
@OEThe11
@OEThe11 2 жыл бұрын
Great Stuff. Thought it would be more complex with a two type container, but you made it simple in 15min. Well Done.
@siddharthsvnit
@siddharthsvnit 3 жыл бұрын
crisp and clear, to the point. helpful video. Thanks
@suryaprakashtoy
@suryaprakashtoy 4 жыл бұрын
Awesome 👍 Excited to view all the Android videos
@someshsahu4638
@someshsahu4638 2 жыл бұрын
Nice explanation thankyou so much 🙏🏼🙏🏼🙏🏼
@rupantaradhikary1793
@rupantaradhikary1793 3 жыл бұрын
King of recyclerview
@shivamchawla4211
@shivamchawla4211 4 жыл бұрын
Awesome tutorial bruh!! Made my Day
@mafiacodes
@mafiacodes 4 жыл бұрын
Subscribe like share😊
@uzairafridi5589
@uzairafridi5589 3 жыл бұрын
Great video, very useful thanks brother
@AlejandroLopez-un6cj
@AlejandroLopez-un6cj 3 жыл бұрын
This is was i looking for so thank you i liked your video for the yt algorithm to recommend me more of your videos :D
@mafiacodes
@mafiacodes 3 жыл бұрын
Subscribe like share 😊
@AlejandroLopez-un6cj
@AlejandroLopez-un6cj 3 жыл бұрын
This is what I was looking for
@mehriddinsobirov2175
@mehriddinsobirov2175 Жыл бұрын
Great! Thanks from Uzbekistan
@techyakshay6868
@techyakshay6868 4 жыл бұрын
Love your work bro. you saved my day ❤❤❤❤❤❤
@mafiacodes
@mafiacodes 3 жыл бұрын
Glad I could help
@priyanshugupta7904
@priyanshugupta7904 3 жыл бұрын
U definitely r indian 😊......mast content hai vro aapka...maja aa gaya⭐⭐⭐⭐⭐
@wykeless
@wykeless 3 жыл бұрын
thank you!
@safwenchaieb2915
@safwenchaieb2915 4 жыл бұрын
thank you very much
@Help2net
@Help2net 4 жыл бұрын
Thank you so much.. Made it Very easily
@mafiacodes
@mafiacodes 4 жыл бұрын
Subscribe like w
@Help2net
@Help2net 4 жыл бұрын
@@mafiacodes Sure
@ketaksingh5465
@ketaksingh5465 2 жыл бұрын
Thanks a lot
@rahhi9792
@rahhi9792 4 жыл бұрын
Thank you sir
@miklosnemeth8566
@miklosnemeth8566 4 жыл бұрын
Excellent. I hope you will go on and you will show us how to use the new PagedListAdapter, which is supposed to be the king solution for large data sets. Thank you.
@fujinafiul6044
@fujinafiul6044 4 жыл бұрын
Thanx a lot
@paragrane5676
@paragrane5676 4 жыл бұрын
Thanks buddy, can u please tell mean how can I implement this with firestorerecycleradapter
@anpowersoftpowersoft
@anpowersoftpowersoft 4 жыл бұрын
Excellent videos please make videos on how we can transform prototypes from Figma or sketch to android studio.
@ShivamKumar-rp8kr
@ShivamKumar-rp8kr 4 жыл бұрын
super helpful!!!
@mafiacodes
@mafiacodes 3 жыл бұрын
Glad it was helpful!
@interestingduniya9181
@interestingduniya9181 Жыл бұрын
Good video
@AniketKumar-hy5zo
@AniketKumar-hy5zo 3 жыл бұрын
thanks
@ashotashrafyan7327
@ashotashrafyan7327 4 жыл бұрын
Thank you very much, what color schemes do you use ? its beautiful
@mafiacodes
@mafiacodes 4 жыл бұрын
Subscribe like share 😊, color schemes as in where?
@ishankhandelwal741
@ishankhandelwal741 2 жыл бұрын
Can we just add a bind() function in our ViewHolder classes which takes holder as a argument and then do the binding in that function, while calling that function in onBindViewHolder?
@eigonnnmarvel7232
@eigonnnmarvel7232 3 жыл бұрын
Thank u!!!! Like!
@bijitkalita9496
@bijitkalita9496 4 жыл бұрын
Thanks.
@mafiacodes
@mafiacodes 4 жыл бұрын
Subscribe like share
@saicharan9652
@saicharan9652 4 жыл бұрын
gives error ClassCastException for ViewHolderOne and ViewHolderTwo objects when we cast holder obj
@ahmedbasalib9300
@ahmedbasalib9300 3 жыл бұрын
Nice , how to do the same thing with firebaseUI recycler adapter ?
@darpanneve2207
@darpanneve2207 Жыл бұрын
I want to change layout as output as data received from database to recycler view from model con you please share solution
@theophilus494
@theophilus494 3 жыл бұрын
great tutorial... can you do a tutorial on this using listadapter with multiviewholders using java
@adnanhaider9949
@adnanhaider9949 3 жыл бұрын
you have not use imageview in viewholder1 so how image show?
@parthanarra6335
@parthanarra6335 4 жыл бұрын
Sir, if the second layout contains only border line and both the layouts should work (i.e one layout contains data and another contains border line between views) how it make it happen both at same time?
@mafiacodes
@mafiacodes 4 жыл бұрын
Every time bind view is called you need to provide layout, then if ur using only border line, then it means ur not displaying data and skipping data for that row, you can do that but that dosent make ne sense to me.
@ripou8572
@ripou8572 4 жыл бұрын
Thanks, you're life saver ^^
@mafiacodes
@mafiacodes 4 жыл бұрын
Subscribe like share 😊
@ownemuhammadahsan6147
@ownemuhammadahsan6147 4 жыл бұрын
Hi Sir Please Is Par Bhi Video Banao k Hum kesy isi Data Ko Volley k Through Fetch kar k show karwa sakty hain jesa k 1 CardView Discounted Products k liye or dusra simple baki Products k lie Isi Source Code main Volley Use kar k Video Bana Do Mujy Bohat Zaruri Chahey Thanks Baki Ap ki Videos Bohat Achi hoti Hain.
@jalajgambhir.1
@jalajgambhir.1 4 жыл бұрын
I want two recycler views inside parent recycler view ( lets call them RV1, RV2 and RVParent). I have used your approach and inflated the layout of the RV1 and RV2 inside RVParentAdapter. But it is not working. Any suggestions?
@mafiacodes
@mafiacodes 4 жыл бұрын
Probably this is what you want kzfaq.info/get/bejne/rpuRma562paunY0.html
@johnsnow8542
@johnsnow8542 3 жыл бұрын
Great Video Sir... Your Explanation is very Accurate.. Is using Multi view RecyclerView expensive than single view type in terms of performance and is there any limit to multi view types count??
@mafiacodes
@mafiacodes 3 жыл бұрын
thanks, not really but if yes its a small bit expensive - though u can use it without any problems, and there is no limit, but again it should be limited since the more view types more expensive.
@johnsnow8542
@johnsnow8542 3 жыл бұрын
Thank you so much..👍👍
@johnsnow8542
@johnsnow8542 3 жыл бұрын
@@mafiacodes Thank you sir
@nitinvats3792
@nitinvats3792 4 жыл бұрын
I have done the exact same thing, but the thing is the data is shuffling as I scroll up and down in a large list. This issue is generally fixed by overriding two methods @Override public long getItemId(int position) { return position; } @Override public int getItemViewType(int position) { return position; } But in this case, we are using the getItemViewType and the data get shuffled on holder getting recycled.
@davidwarner2491
@davidwarner2491 3 жыл бұрын
Thank you very much. Can someone tell me how to inflate these two views alternately?
@abhishekbagela7973
@abhishekbagela7973 4 жыл бұрын
Sir, which theme you are using in Android studio, please make a video about theme.
@mafiacodes
@mafiacodes 4 жыл бұрын
Google developers theme
@programmertony6061
@programmertony6061 2 жыл бұрын
Sir, please make a video on Diffutil
@soumayamondal6915
@soumayamondal6915 4 жыл бұрын
Sir, please do some video on diffutil and listAdapter on recyclerView, and also implement spinner item clicked
@mafiacodes
@mafiacodes 4 жыл бұрын
Will do in upcoming videos
@niteshkamble4708
@niteshkamble4708 2 жыл бұрын
how to handle clicks on each itemView??
@rajuadapa05
@rajuadapa05 4 жыл бұрын
Sir, Please make video for auto image slider retrieve images from firebase database?
@rupantaradhikary1793
@rupantaradhikary1793 3 жыл бұрын
Sir make video on mvvm catching with java
@vadakkanchottanikara6587
@vadakkanchottanikara6587 3 жыл бұрын
Bro.. Name, mobile and photo In recyclerview how. My doubt how to add arraylist these
@mafiacodes
@mafiacodes 3 жыл бұрын
use an array of custom JAVA object...
@sudhakarrotta3626
@sudhakarrotta3626 3 жыл бұрын
hi bro how are you , your tutorials is very help for me .. i requested you make a one video for how to add search filter in nested recylerview please bro help me
@mafiacodes
@mafiacodes 3 жыл бұрын
kzfaq.info/get/bejne/ebqmrdKH2bHTemw.html
@afrididanial
@afrididanial 4 жыл бұрын
all is okey but i think u dont check ur code when u delete or ur list is empty than app is crashing iam getting data from offline database when i delete all record than my app is crashing dont know why
@afrididanial
@afrididanial 4 жыл бұрын
@Windows 10 buddy as beginner everyone dis mistake if you don't motivate anyone than please don't do shit like that thanks
@afrididanial
@afrididanial 4 жыл бұрын
@Windows 10 thanks my issue was solved it was not null expectation error
@arkamondal6160
@arkamondal6160 4 жыл бұрын
Sir please make video on multiple recycler view on a single layout and also using viewpager2... Make tutorial on viewpager and viewpager2
@mafiacodes
@mafiacodes 4 жыл бұрын
Watch my video on sectioned recycler view, it uses multiple recycler view, nd view pager is already on my channel
@arkamondal6160
@arkamondal6160 4 жыл бұрын
@@mafiacodes ok.. But sir i have questions sir.. How to make a recyclerview like flipkart app
@yashthakur8058
@yashthakur8058 4 жыл бұрын
How to create view like in the contacts app, with alphabetical order?
@mafiacodes
@mafiacodes 4 жыл бұрын
Sort your list then display
@eralddeveloper2206
@eralddeveloper2206 4 жыл бұрын
what color scheme are you using
@mafiacodes
@mafiacodes 4 жыл бұрын
Google developers Subscribe like share
@rounakgupta5586
@rounakgupta5586 2 жыл бұрын
how to set multi-adapter in one recycler view
@SamuelHauptmannvanDam
@SamuelHauptmannvanDam 4 жыл бұрын
Could you do a video with this, but for firebase?
@mafiacodes
@mafiacodes 4 жыл бұрын
You can use the same logic inside firebase recycler adapter or the normal recycler adapter
@SamuelHauptmannvanDam
@SamuelHauptmannvanDam 4 жыл бұрын
@@mafiacodes I'm a learning by seeing type of guy. I'd especially love to see an implementation of this answer/solution if you get the time. stackoverflow.com/questions/46390768/implement-multiple-viewholder-types-in-recycleview-adapter
@mukulkumar5133
@mukulkumar5133 2 жыл бұрын
Why we use this pls reply
@idutvuk
@idutvuk Жыл бұрын
So what are you going to do?
@manojgyanwali2434
@manojgyanwali2434 4 жыл бұрын
Please add s New video recycler view with database
@user-rn1pk3tn3b
@user-rn1pk3tn3b 4 жыл бұрын
5/10 for this tutorial you didn't make a general tutorial for example the getItemView type you use => MovisList. get(position). contain(avengers) Note everyone use the same list.
@mafiacodes
@mafiacodes 4 жыл бұрын
Well first 5/10 now 0/10 😉 It’s a tutorial with an example to show how you can use multiview, incase you dint like it - my bad 😊
@user-rn1pk3tn3b
@user-rn1pk3tn3b 4 жыл бұрын
I changed the comment to take you attention to see what you will say
@user-rn1pk3tn3b
@user-rn1pk3tn3b 4 жыл бұрын
And i actually no i like it too much
@mafiacodes
@mafiacodes 4 жыл бұрын
Y not change it to 10/10
@user-rn1pk3tn3b
@user-rn1pk3tn3b 4 жыл бұрын
Anyway, I changed it to 5/10 and of course + like. And if you want. Make I tutorial like this one but on a general recyclerview that will help me and a lot of other people.
@virajbenade9118
@virajbenade9118 11 ай бұрын
i am watching this in 2023 it can not work why ????????????????????????
@mafiacodes
@mafiacodes 11 ай бұрын
It should
@virajbenade9118
@virajbenade9118 11 ай бұрын
@@mafiacodes yes i do it later from scratch it working fine Sorry and thanks for your Valuable content
@tariqnawaz9849
@tariqnawaz9849 4 жыл бұрын
please sir do a tutorials of recyclerview from sqlite database parent and child i-e table personal id name parentid status 1 ali 0 self 2 khan 0 self 3 gul 1 son and display in recyclerview like this ali -------> title gul ------child khan
Expandable Recycler View | Android
12:28
Mafia Codes
Рет қаралды 45 М.
RecyclerView | Everything You Need to Know
25:07
Practical Coding
Рет қаралды 130 М.
Did you believe it was real? #tiktok
00:25
Анастасия Тарасова
Рет қаралды 55 МЛН
Nutella bro sis family Challenge 😋
00:31
Mr. Clabik
Рет қаралды 13 МЛН
Khó thế mà cũng làm được || How did the police do that? #shorts
01:00
Section Recycler View | Grouped Recycler View
25:22
Mafia Codes
Рет қаралды 20 М.
RecyclerView item Click using Interface | Advanced Way | Android
7:01
Android Recycler View With Multiple View Types | Android Studio | Java
29:25
Ускоряем работу RecyclerView. Лучшие практики оптимизации
2:01:23
Android Broadcast. Все об Андроид разработке
Рет қаралды 27 М.
Swipe gestures in Recycler View | Android
18:47
Mafia Codes
Рет қаралды 61 М.
Expandable RecyclerView in Android Studio
24:16
Android WorldClub
Рет қаралды 32 М.