RecyclerView (Kotlin Beginner Example)

  Рет қаралды 71,424

CodingWithMitch

CodingWithMitch

Күн бұрын

Пікірлер: 185
@IsZprAsGaminG
@IsZprAsGaminG 5 жыл бұрын
You have become my master now. Among all the tutorials on KZbin, your videos are the one that clearly understandable
@codinginflow
@codinginflow 5 жыл бұрын
Fake news
@codingwithmitch
@codingwithmitch 5 жыл бұрын
@@codinginflow he said "clearly understandable"
@codinginflow
@codinginflow 5 жыл бұрын
@@codingwithmitch ah yea, my bad
@DavidNitzscheBell
@DavidNitzscheBell 5 жыл бұрын
6:27 you discuss for about a full minute why your `image` field is declared as a `String`. This is a case where the naming of variables is very important and useful. Call the field `imageURL`; this makes it clear to all, even deep in the middle of some chunk of code, that the variable points to an image somewhere and is not actually the (binary) image file.
@gunther982
@gunther982 4 жыл бұрын
The best android tutorial I have come across. So simple and understandable, whilst dropping wisdom and real-world examples. Love it
@muhammadusama4437
@muhammadusama4437 5 жыл бұрын
Select recyclerView item and take information from that to next activity/fragments. Also material design selection. This tutorial is awesome.
@codingwithmitch
@codingwithmitch 5 жыл бұрын
I'll do an onclicklistener one next and nav to a new activity
@brianssendagire262
@brianssendagire262 4 жыл бұрын
Thank you for your selfless share of useful knowledge. As a mobile app developer, you taught me Django web development with the Blog Course and I will without a doubt continue to pay for the online courses you offer. Let's support Mitch folks, pay for his online courses, he's an inspiration and a great guy.
@codingwithmitch
@codingwithmitch 4 жыл бұрын
Thank you Brian
@JoshMartin
@JoshMartin 3 жыл бұрын
Why is there no usage of "findViewById" to reference the elements in the layout file? I keep getting errors of "Unresolved reference" in the BlogViewHolder class, but if I change them to "val blog_image = itemView.findViewById(R.id.blog_image)" then I stop receiving errors.
@ikresimir
@ikresimir 3 жыл бұрын
Thanks Josh!
@thomas_2224
@thomas_2224 3 жыл бұрын
Thank you !
@sb-cr4wu
@sb-cr4wu 3 жыл бұрын
@@thomas_2224 kzbin.info/www/bejne/l5fPkJxsqtupi5I
@danielwatts3718
@danielwatts3718 4 жыл бұрын
These videos are so good. The explanations of why pieces need to be put together is extremely helpful and rare to find on youtube.
@codinginflow
@codinginflow 5 жыл бұрын
Thank you I always wanted to know how that works
@codingwithmitch
@codingwithmitch 5 жыл бұрын
Pleb
@bigotes20random86
@bigotes20random86 3 жыл бұрын
I love you Coding in Flow =)
@Ageleo
@Ageleo 5 жыл бұрын
Thank you! Can't wait for more Kotlin tutorials
@bogdanvacban
@bogdanvacban 5 жыл бұрын
That's one of the most COOL tutorials I have ever seen in my life. You are awesome
@codingwithmitch
@codingwithmitch 5 жыл бұрын
😬
@raypaxman9600
@raypaxman9600 3 жыл бұрын
For some reason, I can't get the adapter to work. When making the "val blog_image = itemView.blog_image" aswell as the others, they aren't connecting to the other file where blog_image, blog_title, and blog_author are. so = itemView.blog_image becomes an error.
@merttatli9455
@merttatli9455 3 жыл бұрын
@CodingWithMitch Thank you for the content, i was tring to write the adapter code myself but i realized that when I implement BlogViewHolder i had an issue with itemView, it cannot see the layout properties. Is there any solution for it?
@merttatli9455
@merttatli9455 3 жыл бұрын
I find out that Kotlin Android Extensions is deprecated. That's why if you want to use this code you need to change it to 'kotlin-parcelize'
@qwingus
@qwingus 2 жыл бұрын
If you want to avoid dependencies on either of these, you could probably just do something like val blogTitle: TextView = itemView.findViewById(R.id.blog_title)
@leonespartano
@leonespartano 5 жыл бұрын
Thanks Mitch. I'm really thankful for all your tutorials. Your form of explaining these complicated topics is wonderful.
@codingwithmitch
@codingwithmitch 5 жыл бұрын
Thanks pal
@mohammadatif2774
@mohammadatif2774 4 жыл бұрын
wow clean and clear explanation
@srdjansmulja5375
@srdjansmulja5375 5 жыл бұрын
HUGE HUGE THANK YOU! Really good tutorial, maybe the best one i saw from Kotlin tutorials. Keep up the good work mate!
@codingwithmitch
@codingwithmitch 5 жыл бұрын
All I ask is that you stay away from that Coding In Flow guy.
@baijusharma6027
@baijusharma6027 5 жыл бұрын
Superb l was awaiting for these kind of tutorials on this channel. Keep going. Kotlin a new journey begins for Android developer.
@iftak01
@iftak01 3 жыл бұрын
Nice vid. Note: Synthetic view were used there in fun bind in ViewHolder Class...but its deprecated now. Good explanation tho
@ziasheikh2863
@ziasheikh2863 3 жыл бұрын
This video on recyclerview is superb. Please also make a video on recyclerview with endless scroll listener in kotlin. There is no quality stuff on this topic as i have checked many videos. Thank you.
@RomskieL
@RomskieL 4 жыл бұрын
Thanks alot! You have explained so well the sequence on how to use the RecyclerView.
@SK-fq2yz
@SK-fq2yz 5 жыл бұрын
Please do Recycle view clicks in Kotlin
@Milan-iw2kr
@Milan-iw2kr 4 жыл бұрын
Did he done it? I can`t find it :(
@agoldfish9239
@agoldfish9239 4 жыл бұрын
Sorry for the late reply but to add an onClick just add this code right below 22:36 in the video on line 37 init { itemView.setOnClickListener { val position:Int = adapterPosition Toast.makeText(itemView.context,"You clicked on item # ${position + 1}", Toast.LENGTH_SHORT).show() } } Also if u want to add a little animation when you click each tile in your layout_blog_list_item.xml add these three tags to where you want it to glow android:clickable="true" android:focusable="true" android:foreground="?selectableItemBackground"
@raypaxman9600
@raypaxman9600 3 жыл бұрын
Getting errors from list and ArrayList() both as errors. Edit: so I changed them to MutableList and arrayListOf() for now. Haven't finished the example, so I don't know if it'll mess it up.
@eternussolutions1084
@eternussolutions1084 3 жыл бұрын
Nice Video Mitch!
@ahmedyosri4827
@ahmedyosri4827 2 жыл бұрын
LOVE THIS PLEASE MAKE MORE
@hoonjung2143
@hoonjung2143 5 жыл бұрын
Thank you! Helped me a lot :) Looking forward to more Kotlin! :D
@muhammedrabee8234
@muhammedrabee8234 3 жыл бұрын
Great job man 👏👏 Keep up
@armandosantos5552
@armandosantos5552 5 жыл бұрын
Nice Tutorial, I want to learn more about Kotlin with your tutorials
@Nikox102
@Nikox102 3 жыл бұрын
I love you dude, you helped me so much! Thanks
@davidscammell9823
@davidscammell9823 5 жыл бұрын
Excellent tutorial - you and your friend over at 'Coding in Flow' are my go to guys for proper tutorials, with the explanations where needed - thank you for the brilliant content!.. Now, just need to hook this up to my Firestore Database, through my Repository and ViewModel and I'll be getting somewhere!! (ahem!) :) +1 for adding onClick to this RecyclerView!
@envoladedeporte
@envoladedeporte 3 жыл бұрын
Awesome video! you helped me a lot!! you have a new subscriber :D
@nexgen.graphics
@nexgen.graphics 4 жыл бұрын
Highly informative and valuable. And thank you for the extras .apply and itemdecoration class :).
@dcsister6057
@dcsister6057 3 жыл бұрын
thank you ,learn so much from you
@dbtechprojects2392
@dbtechprojects2392 4 жыл бұрын
Thanks for the great video, really helpful for people new to android dev
@nidhijoshi2939
@nidhijoshi2939 3 жыл бұрын
23:42. I am getting error in creating requestOptions object. its saying "Cannot create instance of an abstract class". Can anyone help me out with it.
@sudhir1274
@sudhir1274 4 жыл бұрын
Very good RecyclerView Tutorial. Thank you for sharing.
@khaxbiker
@khaxbiker 4 жыл бұрын
Learning a lot from your videos, Thanks one more time!
@mohammadatif2774
@mohammadatif2774 4 жыл бұрын
Once again thank you very much ... this is what i was looking for.
@rushidesai2836
@rushidesai2836 4 жыл бұрын
Great stuff Mitch!!
@antongeraskin159
@antongeraskin159 3 жыл бұрын
great tutorial, helped me a lot
@JohnDoe-cp3co
@JohnDoe-cp3co 5 жыл бұрын
You saved my nerves, thanks bud
@somdatatechnology233
@somdatatechnology233 3 жыл бұрын
thanks mitch for your amazing tutorial, how to connect with api (volley) with this app, could you help me
@vahidhoseini1723
@vahidhoseini1723 4 жыл бұрын
great, good job mitch.
@pragistyomachmud4062
@pragistyomachmud4062 5 жыл бұрын
Just like the thumbnail: 👍
@PhilBrighton4
@PhilBrighton4 5 жыл бұрын
This was very well explained, thanks. I want to create a recyclerview that uses two separate lists / types of data where one set of data follows the other on the same screen. I can combine them into a single list containing the two different data types, but I have been struggling to convert them to display in the two different views . A video covering this would be a godsend to me :)
@avinashbadaramoni4320
@avinashbadaramoni4320 3 жыл бұрын
Whenever you’re starting a beginner video please start from scratch You don’t need to save time if any experts are watching they will go and skip Please try to start from scratch Thank you
@aihoneyai1197
@aihoneyai1197 4 жыл бұрын
i have this problem with class viewholder (in my case is SalesViewHolder), it can't detect the id of the component of layout file. eg. val salesName = itemView.nameRV nameRV is marked red, it says unresolved refernce
@priyamvashi2187
@priyamvashi2187 3 жыл бұрын
val blog_image = itemView.findViewById(R.id.blog_image)
@gilsonjuniorpro
@gilsonjuniorpro 5 жыл бұрын
Great video! So, I am facing some problems using MediatorLiveData, if you have time, would be great see a video from you about this, thank you my friend
@from2ureview251
@from2ureview251 4 жыл бұрын
Thanks dear Mitch
@comradepeter87
@comradepeter87 4 жыл бұрын
Can't we use lambda function to avoid creating the new Decorator class by using the lambda function directly in addItemDecoration() ?
@louiechung4790
@louiechung4790 4 жыл бұрын
Very good tutorial. Thanks
@samha1513
@samha1513 5 жыл бұрын
Great work as always 👌
@codingwithmitch
@codingwithmitch 5 жыл бұрын
😘
@vishalvaidya617
@vishalvaidya617 3 жыл бұрын
Thank you! this really helped me a lot!
@mostafahelalyDev
@mostafahelalyDev 5 жыл бұрын
I have a small problem the item click listener code I don't know where should l put it and I want if I clicked on the item number 1 I want the app intent me to another layout and so on on the other items and I don't know how to lead to the index to do that I hope you help me in this problem
@prasannadeshpande4435
@prasannadeshpande4435 4 жыл бұрын
Loved the tutorial. It was very helpful. Thank you.
@eugeniomeza2886
@eugeniomeza2886 5 жыл бұрын
Thank you very much for the tutorial. Keep up the good work.
@민병찬-k8w
@민병찬-k8w 5 жыл бұрын
Nice explanation for Beginner like me Thank u !!
@jayantjadhav9566
@jayantjadhav9566 3 жыл бұрын
21:23 blog_image gives error as no reference found
@priyamvashi2187
@priyamvashi2187 3 жыл бұрын
val blog_image = itemView.findViewById(R.id.blog_image)
@MalamIbnMalam
@MalamIbnMalam 3 жыл бұрын
One question, in your DataSource class, why not simply just do object DataSource() as opposed to class DataSource then declare the nested companion object? Thanks!
@ziasheikh2863
@ziasheikh2863 3 жыл бұрын
Hello, i hope you're doing good. Thanks for such kind of great videos!!!. Can we control card elevation behaviour? I mean by using card elevation we got a shadow but it is very sharp shadow... Can we control it's sharpness?
@shykatislam5581
@shykatislam5581 3 жыл бұрын
declare the cornerRadius ... i hope it helps Thank You
@eskwelaaco5753
@eskwelaaco5753 3 жыл бұрын
Thank you for this!
@b.k4142
@b.k4142 5 жыл бұрын
Good idea!! i m new kotlin fun!!
@leolimoncito6564
@leolimoncito6564 4 жыл бұрын
Thanks, master, this video is really useful.
@yasserelgammal3696
@yasserelgammal3696 5 жыл бұрын
20:37 you can simply reach views via: holder.view.[views name] = [ modelName.username ] for example
@codingwithmitch
@codingwithmitch 5 жыл бұрын
That's what I did in the bind method
@JosieInCase
@JosieInCase 4 жыл бұрын
Really good video, helped me a lot!! If you could make a video about RecyclerView OnClickListener for Kotlin, that would be awesome!!
@RajeshSamson
@RajeshSamson 5 жыл бұрын
Great Video!.......... thank you
@suhaskadu8595
@suhaskadu8595 3 жыл бұрын
Great Video
@versaticon
@versaticon 4 жыл бұрын
Thanks for sharing your knowlegde.
@rahulattili3039
@rahulattili3039 4 жыл бұрын
Thanks and Subscribed !
@omidmirrajaee8054
@omidmirrajaee8054 5 жыл бұрын
ty mitch for tutorial - and i have 2 question 1 - why use topSpacingItemDecoration? Why not use the xml layer margin 2- The difference between using this code class BlogViewHolder constructor(itemView: View) : RecyclerView.ViewHolder(itemView) with class BlogViewHolder (val itemView: View) : RecyclerView.ViewHolder(view)
@prajnadeep
@prajnadeep 4 жыл бұрын
This was helpful. Thank You!
@byronjosafatmartinelli7373
@byronjosafatmartinelli7373 4 жыл бұрын
Great Tutorials! Just one question. How to make it not like infinite loops? Just want some simple Recycler view.
@shivamkumarjha3302
@shivamkumarjha3302 4 жыл бұрын
Hey Mitch! Just added the margin in layout file and spacing problem solved without spacing item decorator in recyclerview. Is there any other use of spacing item decorator? Great Tutorial, as usual!! Thanks
@namluongxuan2940
@namluongxuan2940 4 жыл бұрын
Thank you sir. That it Great !!
@VishalSingh-eb4zc
@VishalSingh-eb4zc 5 жыл бұрын
Thank you! making kotlin video mitch Bhai
@juliodiamond
@juliodiamond 5 жыл бұрын
Thank you for tutorial. I wait for the next tutorial i'm from Indonesian
@ardi7095
@ardi7095 5 жыл бұрын
jogja hadir.. kejarlah ilmu sampai youtube hehee
@jeanit3378
@jeanit3378 5 жыл бұрын
Hola, muy buen video, estoy aprendiendo kotlin y este tutorial ha sido el que mas me ha servidor :),,,, tengo una consulta por cierto,,, estuve haciendo unos cambios en el data source para poder obtener la data desde internet y cuando lo ejecuto no pasa nada,, sin embargo cuando le pongo un delay de 2 segundos carga perfecto con la info de internet,, supongo que el problema va por el tema sincrono y asincrono,, entonces,,,sabes alguna forma de hacerlo asincrono para que cargue en background y luego presente los resultados?,, o por ultimo bloquear la app hasta que espere el resultado del GET.
@thekralj9600
@thekralj9600 3 жыл бұрын
how the hell you don't need to use findViewById anywhere?
@sb-cr4wu
@sb-cr4wu 3 жыл бұрын
kzbin.info/www/bejne/l5fPkJxsqtupi5I
@goobar
@goobar 5 жыл бұрын
shirt game is strong in this intro 😀
@codingwithmitch
@codingwithmitch 5 жыл бұрын
DBZ is life
@TBrianOnline
@TBrianOnline 4 жыл бұрын
Thank for the tutorial! How can I make the list from my own assets?
@mantiriadeputra1188
@mantiriadeputra1188 3 жыл бұрын
hi Mitch nice tutorial. my recycle view can load the data perfectly , but I don't no why I'm getting this error "E/RecyclerView: No adapter attached; skipping layout". Please Help. Thank you
@priyamvashi2187
@priyamvashi2187 3 жыл бұрын
val blog_image = itemView.findViewById(R.id.blog_image)
@erlanbulanbekov4703
@erlanbulanbekov4703 4 жыл бұрын
ItemView.context will return applicationContext? or Activity context?
@shihabmohammad6157
@shihabmohammad6157 5 жыл бұрын
@codingWitMitch it would be awesome if you post some thing that show how we can wire different views like recycler-views and recycler-view list menu with bottom navigationbar/ or inside fragments
@codinginflow
@codinginflow 5 жыл бұрын
the "image pointer" almost looks like a URL
@hatty101
@hatty101 4 жыл бұрын
what are you doing here? lol
@codinginflow
@codinginflow 4 жыл бұрын
@@hatty101 setting things straight
@hatty101
@hatty101 4 жыл бұрын
@@codinginflow ok, make a tutorial about recyclerview and jsoup on kotlin please, i cant find a new one.
@stephanieha1413
@stephanieha1413 5 жыл бұрын
Do you teach how to click inside of the card view?? Really need it xD
@SaherAlSous-welcomes-you
@SaherAlSous-welcomes-you 3 жыл бұрын
I got this problem: Classifier 'LayoutManager' does not have a companion object, and thus must be initialized here --> RecyclerView.LayoutManager = LinearLayoutManager(this@MainActivity)
@terjemah_alquran
@terjemah_alquran 5 жыл бұрын
thank you this, help me alot
@yuktasood853
@yuktasood853 4 жыл бұрын
Hi! Thanks for the great video! I've implemented the recyclerView but I can only see the default images. Can you help?
@TheRajmoney
@TheRajmoney 4 жыл бұрын
please do video with different views using kotlin
@mskatanani
@mskatanani 5 жыл бұрын
Would you please clarify the differences between using the generic view holder and the customized one in adapter
@codingwithmitch
@codingwithmitch 5 жыл бұрын
the custom one contains all the fields from the custom layout we built
@fruitpunchi
@fruitpunchi 4 жыл бұрын
Thank you bro
@shaydstv8542
@shaydstv8542 5 жыл бұрын
Hi Mitch, first thank you for your help through all your videos ! Second, could you make a course about Dual Panel fragments in landscape ? - RecyclerView in left fragment - ItemDetail in right fragement So far I didn't find out how to pass data from my recyclerview item to my fragment detail... Thanks :)
@blessonthomas4875
@blessonthomas4875 3 жыл бұрын
Please can you do video in different view type
@eagleeye2316
@eagleeye2316 5 жыл бұрын
good day, i am getting this error, Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED what should i do?please help
@Alegoria7
@Alegoria7 5 жыл бұрын
I have problems when i have to put the (parent.context), it gives an error, how can i fix it?
@calvinusiri9498
@calvinusiri9498 5 жыл бұрын
Hey Mitch, thanks for the video. I know the example above is for beginners, but how would you solve for a situation where you are loading images async with glide and scroll up/down really quickly with your recyclerview. Because the views are being recycled, and Glide is async, you'll have the incorrect image being shown on your Imageview for a moment before glide catches up with correct image. Do you know of a way to handle this without clearing Glide or setImageBitmap(null).
@codingwithmitch
@codingwithmitch 5 жыл бұрын
No that doesn't happen. Just use it as I showed you
@ryanchildress2386
@ryanchildress2386 3 жыл бұрын
Newbie Question? Why cant I import anything from codingwithmitch?
@tohaassegaf8695
@tohaassegaf8695 5 жыл бұрын
my picture doesn't appear, do you know what the problem is?
@hatty101
@hatty101 4 жыл бұрын
Please make one with jsoup too!
@matijasokol2881
@matijasokol2881 5 жыл бұрын
recycler is working without notifyDataSetChanged in submitList method?
@codingwithmitch
@codingwithmitch 5 жыл бұрын
Woops. You need to add that
@agoldfish9239
@agoldfish9239 5 жыл бұрын
First!!!
@codingwithmitch
@codingwithmitch 5 жыл бұрын
yayaya
@DavidNitzscheBell
@DavidNitzscheBell 5 жыл бұрын
I think it would be more descriptive to call your `image` variable, `imageURL`.
RecyclerView Performance with DiffUtil (Kotlin)
15:43
CodingWithMitch
Рет қаралды 23 М.
Kotlin Coroutine Jobs (Beginner Example)
32:35
CodingWithMitch
Рет қаралды 48 М.
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН
Kotlin Singleton Example with MVVM and Coroutines
36:24
CodingWithMitch
Рет қаралды 56 М.
RecyclerView | Everything You Need to Know
25:07
Practical Coding
Рет қаралды 152 М.
Kotlin Coroutines Beginner Example (Android)
23:12
CodingWithMitch
Рет қаралды 160 М.
5 Fatal Coroutine Mistakes Nobody Tells You About
18:15
Philipp Lackner
Рет қаралды 90 М.
Kotlin RecyclerView Template (DiffUtil and AsyncListDiffer)
26:34
CodingWithMitch
Рет қаралды 16 М.
What if all the world's biggest problems have the same solution?
24:52
Android Data Binding: Getting Started
46:04
CodingWithMitch
Рет қаралды 98 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 201 М.
RECYCLERVIEW - Android Fundamentals
24:58
Philipp Lackner
Рет қаралды 108 М.
Google I/O 2012 - Go Concurrency Patterns
51:27
Google for Developers
Рет қаралды 827 М.
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН