<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/you-shall-not-pass-or-dispose-zuna1dsfu" -->

---
title: You Shall Not Pass or Dispose | daily.dev
description: LazyColumn in Jetpack Compose disposes items when they scroll out of view, causing animations to restart when items return to the viewport. This is problematic...
canonical: https://daily.dev/posts/you-shall-not-pass-or-dispose-zuna1dsfu
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: You Shall Not Pass or Dispose | daily.dev
og:description: LazyColumn in Jetpack Compose disposes items when they scroll out of view, causing animations to restart when items return to the viewport. This is problematic...
og:url: https://daily.dev/posts/you-shall-not-pass-or-dispose-zuna1dsfu
og:image: https://api.daily.dev/og/posts/zUNA1dSfu.png
og:image:alt: You Shall Not Pass or Dispose
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# You Shall Not Pass or Dispose

**[ProAndroidDev](https://daily.dev/sources/pand)** · 3 min read · 0 upvotes · 0 comments

## Summary

LazyColumn in Jetpack Compose disposes items when they scroll out of view, causing animations to restart when items return to the viewport. This is problematic for chat apps displaying character-by-character AI responses. The solution is using PinnableContainer (introduced in Compose 1.4.0) with a single line of code: pinnableContainer?.pin(). This keeps items active in memory even when off-screen, allowing animations and effects to continue uninterrupted. Alternative approaches include using Column with verticalScroll (keeps all items in memory but impacts performance) or using key parameters to optimize recomposition.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://proandroiddev.com/you-shall-not-pass-or-dispose-59103e9ea71e>

## Similar posts on daily.dev

- [jetc.dev Newsletter Issue \#324](https://daily.dev/posts/jetc-dev-newsletter-issue-324-bbtnb20c0) · Jetpack Compose Newsletter · 0 upvotes · 0 comments
- [Why Your LazyColumn Is Still Janky](https://daily.dev/posts/why-your-lazycolumn-is-still-janky-bg3pqalie) · ProAndroidDev · 0 upvotes · 0 comments
- [Jetpack Compose Performance Optimization](https://daily.dev/posts/jetpack-compose-performance-optimization-qw7nfjbya) · Towards Dev · 7 upvotes · 0 comments
- [Mission Impossible: How to Achieve 0 Recompositions in a Complex Custom UI](https://daily.dev/posts/mission-impossible-how-to-achieve-0-recompositions-in-a-complex-custom-ui-mmppgyhhv) · ProAndroidDev · 0 upvotes · 0 comments
- [Improve Jetpack Compose TV scrolling experience](https://daily.dev/posts/improve-jetpack-compose-tv-scrolling-experience-zwamulqnf) · Medium · 0 upvotes · 0 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#android](https://daily.dev/tags/android), [#kotlin](https://daily.dev/tags/kotlin), [#jetpack-compose](https://daily.dev/tags/jetpack-compose)

[View this post on daily.dev](https://daily.dev/posts/you-shall-not-pass-or-dispose-zuna1dsfu)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"You Shall Not Pass or Dispose","url":"https://daily.dev/posts/you-shall-not-pass-or-dispose-zuna1dsfu","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/you-shall-not-pass-or-dispose-zuna1dsfu"},"datePublished":"2026-01-26T23:53:16.427Z","dateModified":"2026-01-26T23:53:33.420Z","description":"LazyColumn in Jetpack Compose disposes items when they scroll out of view, causing animations to restart when items return to the viewport. This is problematic...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/177e81d54fb9472c0ae52a6aed8ce47f?_a=AQAEulh","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/177e81d54fb9472c0ae52a6aed8ce47f?_a=AQAEulh","isAccessibleForFree":true,"articleSection":"ProAndroidDev","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ProAndroidDev","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/656c1eb1f1ef4f91936e86fc16545114","url":"https://daily.dev/sources/pand"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/you-shall-not-pass-or-dispose-zuna1dsfu","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"performance,android,kotlin,jetpack-compose","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ProAndroidDev","item":"https://daily.dev/sources/pand"},{"@type":"ListItem","position":3,"name":"You Shall Not Pass or Dispose"}]}
```

