RecyclerView and CardView for Jetpack Compose (LazyColumn and Card)
HTML-код
- Опубликовано: 19 окт 2024
- The BEST android courses in the world: codingwithmitc...
In this video I show you what the RecyclerView and CardView equivalents are for jetpack compose. The jetpack compose version of a recyclerview is a LazyColumn. LazyColumnFor and LazyColumnForIndexed were deprecated as of jetpack compose version alpha 09. Now you are supposed to use LazyColumn.
The CardView equivalent for jetpack compose is Card.
Code: github.com/mit...
Follow me:
Instagram: / codingwithmitch
Twitter: / mitch_tabian
.
. - Наука
I am new to all three items .
Kotlin mvvm and jetpack and I have to say your video is amazing.
Thank You Mitch. I thought you will be writing adapters for recyclerview but it is as simple as Flutters' list item builder.
The dead of Recyclerview and his adapters children makes me happy hahaha
Hi Mitch. Would like to thank you for being so considerate of your learners. A simple act of using white background in your Android Studio is so much comfortable. Don't know why almost everyone else is crazy about black screens where it is so difficult to figure out the code. Power-saving is essential but not at the cost of huge inconvenience for end users
I find it a lot easier to see when the text is on the darker background, plus it's easier on your eyes at night
Thank you, mitch. You're awesome
I read an article today that said "Declarative UI" is the new "mega" trend, and Compose will eventually replace the traditional XML UI in Android. Another article said that traditional XML layout stuff is the "Imperative UI". But seeing is the code, how is the method of creating the UI in Compose fundamentally different form the XML UI? It seems that it is creating the UI in the same way as the XML but looks shorter only because we are using default values for things that we had to explicitly declare in the XML such as the "android:layout_width". If Google had decided to make those attributes all omittable and default values were chosen for them, wouldn't it be basically the same as this Compose UI declaration? And they say that one of the "pros" of the Compose UI is that the code looks cleaner, but all those nested code blocks look more difficult to understand than the XML.
Recycling ♻️ engagement
انت استاذ رائع......its mean: you are fantastic master
Thanks Mitch. Here goes the engagement
I like how you say Blah, Blah, Blah at 15:23, pleasure listening to you.
Hi Mitch! Great content!
Here is my prideful engagement!!
Thank you for the video!
looking like an HTML tags... missing the tag!!😁.. lovely
Thank you Mitch !
thanks mitch!
Great stuff! Thank you :)
Hi great vedio but i wonder what font you are using 👌
Awesome, thanks!
Waiting for loading images. I'm trying with CoilImage (from accompanist) but the scroll is really weird.
I'll show you a simple method tomorrow
With my low spec laptop, mine is smooth.
I donno why, anyway thanks for new LazyColumn function, that's amazing function
Thank u Mitch, so why you’re not used ConstraintLayouts in the Card(){} ? Thank u again for this courses
You can. I'll cover constraint layout later at some time
Hey Mitch... there is no way in compose to show if user is overscrolling(when reached the end of list or the beginning of list), the visual feedback is built in when using XML and also the swipe down to refresh is not possible in compose as of now... is that right?
Thank you
I love BBM
Nice!!
Is there a way to add a scrollbar thumb here? I have a lot of rows here and need a scrollbar thumb and I just cant find a way to add one. Pls help. Thanks.
Hi Mitch,
Can you tell us why we are not using @Preview in our components?
I'm not because its slow and it makes me angry
Amazing
Thank you!
The best.
Shouldn't convert the .png image to .webp?
Mitch
great!
thanks for your efforts
list is too laggy because bitmap drawable is too large , when you put file in default drawable dir android system rescale it by 2X or 3X to display ,which means that you are using very large images when loading list
👍👍
I wish there was some visual representation of the code when building the components like when the xml was used.
hey, you can preview what you are building using the preview annotation and calling the function you want to see inside the function annotated with preview.
❤❤❤❤
Does anybody know how to access MaterialTheme.shapes.small/medium etc? I tried googling it and can't find any info, seems to have changed since Mitch made this video. Official Jetpack Compose Theming documentation uses the same syntax but I can't access it. I checked gradle file and as far as I can tell I have all the correct imports. Anybody know the new way to do it??
Engagement++
Like++
How to setup animation when scroll the list to the top and the end?
Engagement para ti
creating adapter seems it will deprecate soon :) :)
woohoo
I mean thank you
👌👨💻🙌
how to load image from resources in Compose?
Hey did you find a way to do it? Is it using painterResource??
@@hellespont5072
Image(
painter = painterResource(R.drawable.margarita),
contentDescription = "Content description for visually impaired",
Modifier.size(100.dp)
)
why don't use xml for ui?
This is a compose tutorial.
That will be legacy stuff on Compose release day.
Begiest difference in java and kotlin Semicolons are replaced by brackets 😂😂
oh god it was as leggy as my windows old surface pro 3
weff
Thank You
👏
Many thanks
thank you