Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

81
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda