# compose-animation

Published articles for compose-animation.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## How to build Wrapped 2023 in Compose Animation

DevFeed: [How to build Wrapped 2023 in Compose Animation](<https://devfeed.tech/articles/how-to-build-wrapped-2023-in-compose-animation-32058.md>)

Original publisher: [Read original article](<https://www.maiatoday.net/p/how-to-build-wrapped-2023-in-compose-animation/>)

Published: 2023-12-09T15:18:17Z

Content type: tutorial

Language: en

Sources: [maiatoday](<https://devfeed.tech/sources/maiatoday.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [SVG](<https://devfeed.tech/topics/svg.md>)

Tags: [animate](<https://devfeed.tech/tags/animate.md>), [animation](<https://devfeed.tech/tags/animation.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-animation](<https://devfeed.tech/tags/compose-animation.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [svg](<https://devfeed.tech/tags/svg.md>)

### AI overview

A tutorial on recreating selected Spotify Wrapped 2023-style animations with Jetpack Compose. It demonstrates Canvas drawing, drawWithCache, gradients, RoundedPolygon transformations, looping animations, progressive line drawing, and extracting paths from SVG files.

### Source excerpt

How to build Wrapped 2023 in Compose Animation If I had to build the Spotify Wrapped 2023 animations in Compose, this is how I would do it. This blog post doesn't reproduce the effects identically, but it shows some of the basic Compose animation techniques you could use. It uses Canvas drawing and especially the drawWithCache modifier. It also uses RoundedPolygon, various matrix transformations and looping animation techniques using infiniteRepeatable. There is a section about how to get a path from an svg file as well. I created three different techniques. The first is a simple box with an animating linear gradient and an animating offset. The second is a spiky star using a RoundedPolygon with colour stop gradient and some animations in a graphicsLayer. The last is a progressivly drawing line. As a bonus we'll make a palette using unsplash.com and coolors.co Let's start with the palette. Pick a palette Pick an image from unsplash and pull some colours from the image. Here's one I got. I then loaded it into coolors.co and picked some palette colours from the image. Here are the colours I picked: val Pasta = Color(0xFFE7D6CE) val OrangeSquash = Color(0xFFFD9B72) val Plumberry = Color(0xFF682084) val Aubergette = Color(0xFF421F7B) val SwimmingCap = Color(0xFF4FBBA5) val Cherry = Color(0xFFFC1946) val Sherbet = Color(0xFFD33BB9) val Licorice = Color(0xFF35192B) val Custard = Color(0xFFFEC05D) We can now use these everywhere as gradients or backgrounds and our animation will have a consistent look that matches the mood from the image. Shimer pane - animating Linear Gradient For this sliding box we animate the offset with an infiniteRepeatable and we animate the offset of the LinearGradient. The colors of the gradient are chosen from the colors of our newly created palette. The linear gradient changes colour from corner to corner. By changeing the offset of the gradient it moves the gradient in the shape. If we then animate this offset it will make the colours move acro

## Custom Dialog Animation in Jetpack Compose

DevFeed: [Custom Dialog Animation in Jetpack Compose](<https://devfeed.tech/articles/custom-dialog-animation-in-jetpack-compose-25772.md>)

Original publisher: [Read original article](<https://www.sinasamaki.com/custom-dialog-animation-in-jetpack-compose/>)

Author: sinasamaki

Published: 2023-10-17T04:42:08Z

Content type: tutorial

Language: en

Sources: [sinasamaki](<https://devfeed.tech/sources/sinasamaki.md>)

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

Tags: [animation](<https://devfeed.tech/tags/animation.md>), [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-animation](<https://devfeed.tech/tags/compose-animation.md>), [dialog](<https://devfeed.tech/tags/dialog.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>)

### AI overview

A tutorial on creating custom dialog animations in Jetpack Compose. It explains how to build a dialog, remove the default window animation and scrim, and use custom animation logic, including AnimatedVisibility, to control showing and dismissing the dialog.

### Source excerpt

Create custom dialog animations using Jetpack Compose animation composables such as AnimatedVisibility

## Animation in Jetpack Compose

DevFeed: [Animation in Jetpack Compose](<https://devfeed.tech/articles/animation-in-jetpack-compose-22648.md>)

Original publisher: [Read original article](<https://www.valueof.io/blog/animation-compose-api-summary>)

Author: James Shvarts

Published: 2022-07-01T04:00:00Z

Content type: tutorial

Language: en

Sources: [Android Blog - Mobile Dev Notes](<https://devfeed.tech/sources/android-blog-mobile-dev-notes.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [API](<https://devfeed.tech/topics/api.md>), [Android](<https://devfeed.tech/topics/android.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [animation](<https://devfeed.tech/tags/animation.md>), [api](<https://devfeed.tech/tags/api.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-animation](<https://devfeed.tech/tags/compose-animation.md>), [debug](<https://devfeed.tech/tags/debug.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [layout](<https://devfeed.tech/tags/layout.md>), [state](<https://devfeed.tech/tags/state.md>), [suspend](<https://devfeed.tech/tags/suspend.md>), [tooling](<https://devfeed.tech/tags/tooling.md>)

### AI overview

A foundational overview of Jetpack Compose Animation APIs, organized around animation scenarios and API selection. It covers declarative and state-based APIs, customization, coroutine-based lower-level APIs, and Android Studio tooling for implementation and debugging.

### Source excerpt

Foundational overview of Compose Animation APIs to help you choose most suitable API for your animation task.

## Lightning Demo of Compose animation

DevFeed: [Lightning Demo of Compose animation](<https://devfeed.tech/articles/lightning-demo-of-compose-animation-32066.md>)

Original publisher: [Read original article](<https://www.maiatoday.net/p/lightning-demo-of-compose-animation/>)

Published: 2022-02-28T19:13:06Z

Content type: article

Language: en

Sources: [maiatoday](<https://devfeed.tech/sources/maiatoday.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Demo](<https://devfeed.tech/topics/demo.md>)

Tags: [animate](<https://devfeed.tech/tags/animate.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-animation](<https://devfeed.tech/tags/compose-animation.md>), [demo](<https://devfeed.tech/tags/demo.md>), [desktop](<https://devfeed.tech/tags/desktop.md>), [lightning](<https://devfeed.tech/tags/lightning.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [talk](<https://devfeed.tech/tags/talk.md>)

### AI overview

A lightning talk for Jozi-JUG demonstrates Compose animation on mobile and desktop, with accompanying slides.

### Source excerpt

A lighting talk for Jozi-JUG demonstrating Compose animation and demo on mobile and desktop. slides

## Magic Sprinkles at DevFest UK Ireland

DevFeed: [Magic Sprinkles at DevFest UK Ireland](<https://devfeed.tech/articles/magic-sprinkles-at-devfest-uk-ireland-32068.md>)

Original publisher: [Read original article](<https://www.maiatoday.net/p/magic-sprinkles-at-devfest-uk-ireland/>)

Published: 2022-01-29T10:53:10Z

Content type: tutorial

Language: en

Sources: [maiatoday](<https://devfeed.tech/sources/maiatoday.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [animate](<https://devfeed.tech/tags/animate.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-animation](<https://devfeed.tech/tags/compose-animation.md>), [compose-ui](<https://devfeed.tech/tags/compose-ui.md>), [devfest](<https://devfeed.tech/tags/devfest.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [repo](<https://devfeed.tech/tags/repo.md>), [sample](<https://devfeed.tech/tags/sample.md>), [talk](<https://devfeed.tech/tags/talk.md>), [ui-components](<https://devfeed.tech/tags/ui-components.md>), [video](<https://devfeed.tech/tags/video.md>)

### AI overview

A shorter version of a DevFest UK Ireland talk introducing Jetpack Compose animations. It covers the animation API, simple quick-win animations, and more complex custom animations, with examples in a sample app and companion code repository.

### Source excerpt

A shorter version of my Magic Sprinkles talk presented at DevFest UK Ireland Magic Sprinkles: Adding animations to your app with Jetpack Compose I have some Jetpack Compose UI components in my app and now I want to add animations, where do I start? In this presentation I will look briefly at the Jetpack Compose animation api to get an overview of the animation system. Then I will look at a few quick win simple animations that can add some magic to your app. I will dive into more complex and custom animations to see what is possible. All of these experiments will be illustrated in a sample app provided in a companion repo. At the end of this talk you will: have an overview of how animation works in Jetpack Compose have some practical animation examples that you can add to your app immediately have an idea of what is possible with complex and custom animations have a code repo of examples Repo Slides Video

## Swipe to reveal in Jetpack Compose

DevFeed: [Swipe to reveal in Jetpack Compose](<https://devfeed.tech/articles/swipe-to-reveal-in-jetpack-compose-25899.md>)

Original publisher: [Read original article](<https://proandroiddev.com/swipe-to-reveal-in-jetpack-compose-6ffa8928a4c2?source=rss-56174fa84bcc------2>)

Author: Denys Rudenko

Published: 2021-02-19T17:21:58Z

Content type: tutorial

Language: en

Sources: [Stories by Denis Rudenko on Medium](<https://devfeed.tech/sources/stories-by-denis-rudenko-on-medium.md>)

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-animation](<https://devfeed.tech/tags/compose-animation.md>), [draggable](<https://devfeed.tech/tags/draggable.md>), [gestures](<https://devfeed.tech/tags/gestures.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [stateflow](<https://devfeed.tech/tags/stateflow.md>), [swipe-to-reveal](<https://devfeed.tech/tags/swipe-to-reveal.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

### AI overview

A tutorial showing how to implement swipe-to-reveal cards in Jetpack Compose by detecting horizontal drag gestures and managing revealed card state with a view model and StateFlow.

### Source excerpt

Swipe to dismiss is really easy to implement in compose, including item removal animation by using a combination of SwipeToDismiss & AnimatedVisibility composables. SwipeToDismiss doesn't allow us to stop the dragging motion midway though, so let's take a look how we can achieve the following by detecting horizontal drag gestures on any composable. https://medium.com/media/1a355b2d3e397414c51442342f16cda5/hrefStep 1: Creating a data source Those who've read expandable lists in jetpack compose can skip this step, since data source is almost the same. First we define our model to hold the card related info: data class CardModel(val id: Int, val title: String) We'll be using AAC viewModel example here, but feel free to use any "controller" abstraction you prefer. https://medium.com/media/28ca457093268969ac4f2e179ee860ef/href This class serves 5 purposes: Holds list of cards using MutableStateFlow in _cards field, and exposes a StateFlow to observers via cards field. Holds list of "revealed" card ids in _revealedCardIdsList, and exposes them to observers via revealedCardIdsList field. Provides list of cards using getFakeData() function. We need a coroutine here, to emit the testList into _cards. Has onItemExpanded() to mark cards as revealed, by adding tapped card id to _revealedCardIdsList, and notify observers about this change by mutating the state of _revealedCardIdsList. Has onItemCollapsed() to remove revealed card id from _revealedCardIdsList, and notify observers about this change by mutating the state of _revealedCardIdsList. Step 2: CardsScreen composablehttps://medium.com/media/4505fde17b0e8f9672f392cb9b3296f3/href We are observing the viewModel.cards containing our list of cards, and viewModel.expandedCardIds with the help of .collectAsStateWithLifecycle(). UI is quite simple here, each list item is represented with a Box that contains our hidden action icons & the draggable card. ActionsRow -- row with 3 icons, exposes callbacks from each icon tap: onDelete,