# How to animate BottomSheet content using Jetpack Compose

DevFeed: [How to animate BottomSheet content using Jetpack Compose](<https://devfeed.tech/articles/how-to-animate-bottomsheet-content-using-jetpack-compose-26018.md>)

Original publisher: [Read original article](<https://proandroiddev.com/how-to-animate-bottomsheet-content-using-jetpack-compose-3eab972b3bdc?source=rss-e93d234beac6------2>)

Author: Yahor Urbanovich

Published: 2021-08-09T13:10:56Z

Content type: tutorial

Language: en

Sources: [Stories by Yahor Urbanovich on Medium](<https://devfeed.tech/sources/stories-by-yahor-urbanovich-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [animation](<https://devfeed.tech/tags/animation.md>), [bottomsheet](<https://devfeed.tech/tags/bottomsheet.md>), [code](<https://devfeed.tech/tags/code.md>), [experience](<https://devfeed.tech/tags/experience.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

A tutorial on animating BottomSheet content with Jetpack Compose. It compares existing Compose examples, explains their state and visibility handling, and introduces a simpler approach using Compose BottomSheet APIs.

## Source excerpt

Note: Everything in this post related to Compose 1.0.1 and maybe in the future Google will introduce a new API and approaches like Compose MotionLayout 🐰 Early this year I started a new pet project for listening to random radio from over the world. The UI at the beginning was very simple and clear, just a logo with the station name and necessary controls. The main functionality is integration with Android Auto, but it is a topic for a separate story (just ask in the comments if you are interested in this theme). First app iteration Using the application, it became necessary to see user liked stations, other categories separated by genre and country. The idea is to make a Home screen with a list of different information and player which can be shown and hidden on the screen. Final resultFind available solutions As a normal developer, I started to research existing compose projects to find already implemented functionality. The official and community samples contain only the UI part and don't include any interaction. For example, the Spotify UI demo application for me implies a presence player screen, but in source code, it's just a Row with content. https://github.com/Gurupreet/ComposeCookBook Another interesting repository I found is a Podcast App. According to the gif looks like what I was looking for. https://github.com/fabirt/podcast-app After inspecting the source code I understood how it works. The PodcastPlayerScreen is a Root composable for the player and it added to the composition of the main screen. By default, it's not visible for users. https://github.com/fabirt/podcast-app/blob/6b4876fd007c54e3f10160c091d3c29147b20211/android/app/src/main/java/com/fabirt/podcastapp/ui/MainActivity.kt#L57 Then if the user clicks on some podcast item it changes the showPlayerFullScreen boolean. Recomposition triggers the AnimatedVisibility logic and the player appears. https://github.com/fabirt/podcast-app/blob/6b4876fd007c54e3f10160c091d3c29147b20211/android/app/src/main