Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

78
Views
Recomposition in jetpack compose vs recycle in old ui?

LazyColumn and LazyRow are replacing for RecyclerView in the old UI but when scrolling the item in RecyclerView and back to it disappear then recycle to optimization UI.

LazyColumn and LazyRow are doing the same thing?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I found it from Jetpack Compose basics Codelab

Note: LazyColumn doesn't recycle its children like RecyclerView. It emits new Composables as you scroll through it and is still performant, as emitting Composables is relatively cheap compared to instantiating Android Views

After testing, I see that LazyColumn just compose visible items. And, by scrolling the invisible items will recompose when it visible again.

over 4 years ago · Santiago Trujillo Report

0

LazyColumn uses LazyList which uses LazyLayout and it uses aSubComposeLayout to recompose children Composable when required unlike having a Column with Modifier.verticalScroll() which composes all of its children Composables.

Subcomposable has a subocompose function that can be called multiple times in the layout block. This is, for example, what happens in LazyRow. The slotId allows SubcomposeLayout to track and manage the compositions created by calling subcompose. For example, if you are generating the content from an array you might want use the index of the array as its slotId allowing SubcomposeLayout to determine which subcompose generated last time should be used to during recomposition. Also, if a slotid is not used any more, SubcomposeLayout will dispose its corresponding composition.

You can read full answer about SubcomposeLayout by Google developer here.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!