How to Implement a Multi-Select LazyColumn in Jetpack Compose - Android Studio Tutorial

preview_player
Показать описание
This video will teach you how you can select multiple items in Jetpack Compose in Android.

⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:

💻 Let me personally review your code and provide individual feedback, so it won't backfire and cost you a fortune in future:

🎓 Become an industry-ready developer in the Mobile Dev Campus:

🎁 Get my FREE 4.5h course "The Best Practice Guide to Android Architecture":

Read our weekly Android blog:

Join this channel to get access to perks:

Get the source code for this video here:

Regular live codings on Twitch:

Join my Discord server:

You like my free content? Here you can buy me a coffee:
Рекомендации по теме
Комментарии
Автор

Dear Philip, you are best Android instructor on YouTube. I highly recommend that you create a course for beginners only in Kotlin and upload it to Udemy because most courses there are BS. Besides, If you did so, I suggest that you don't make it longer than 30 hours. I will be the first one to buy it and give it a 5-star review. I think a lot of your fans are looking forward for this course. Also Don't forget to make it project-based, I mean 3 to 5 small projects and at least 1 medium project.
Thank you a lot for Best Content Ever.
Best Wishes for you 😊🥰
(Waiting for reply ... 😎)

mikesummer
Автор

Hey Philip do you know what is up with the android paging compose library being at alpha 14 for about 2 months now? My lazy columns are still laggy, the coil images in the lazy column Alsop take too long to load... Any idea when this library will get into beta.. Release version etc..?

anudeepananth
Автор

sir i do this way .clickable
{
audioState = audioState.mapIndexed { index, audioModel ->
if (it == index) {
audioModel.copy(isPlaying = !audioModel.isPlaying)
} else {
audioModel.copy(isPlaying = false)
}
}
} and it is working but it can not give performance as expected

virajbenade
Автор

how do you persist the checkmarks so when the user comes back it still stays there?

SathvikKonuganti
Автор

Hey Phillip, thanks for the video. I learned something new today. I am specifically concerned about how to implement a long-press action on an item and maybe delete the selected items, just like in WhatsApp. I would be very glad to learn that from you

francismwangi
Автор

Anyone, do you remember in which video Philipp shows how to build hilt module that provides Dispatchers? Such a neat way, cannot find it anymore. Thanks!

dawidtyburek
Автор

How do I give each item a name instead of "Item $it"?

HorseEngine
Автор

sir if we want to select single item how we do that sir

virajbenade
Автор

Hi Philip, the clickable block is expensive ? is there another work around to lean the selection.

sudeeveekey
Автор

Thank you for the awesome tutorial Philip! Just have one question, when the list of data comes in updated, but the mapped `items` remain the same. How can that be updated?

annienguyen
Автор

Btw, LayzListScope offers an itemsIndexed{ item, index -> /* TODO */ } version.
Also, functionality like the mapping should be done in a separate function (or better in a viewModel ....)

marcelreiter
Автор

Hi Phillip, I am learning through your Youtube videos. In one of your videos I see a LazyList displayed when user enters a search query and API returns results for that query. Can you please give a pointer on how to clear the loaded list when user clears the search field?

ricks
Автор

Couldn't you just write: items[i].isSelected = !items[i].isSelected

instead of mapping the entire list?

DerCheckerzeigts
Автор

how i can implement values from list of checkbox

mohamedharpy-jdzs
Автор

how about with PagingData, and add select all function

刘学-oq
Автор

Love your content, learning lot of things from your video!!!
What change is needed to have single selection of item from LazyColumn ?
What line of code I need to write for single selection

aniketkanitkar
Автор

Hi philip, is there way protect code anti edit smali files?

alijfer
Автор

What if you scroll the screen? Do the selected items stay selected? I think not, and to do that you will need to use mutableStateListOf instead of mutableStateOf.

lucasnrb
Автор

Does assigning a new value to items make recomposition effect all the rows? From what I understand, all the rows are bound to same state, items. You change items on every click. Does this make all the rows recompose?

drmucahiderdogan
Автор

can you please make video on implementing Dialog Fragment as a separate class..

ramasubramanian