Sitemap
Better Programming

Advice for programmers.

Exploring AnimatedVisibility in Compose

Jetpack Compose — Animation Notes: 01

4 min readJul 19, 2022

--

Press enter or click to view image in full size
Photo by Clay Banks on Unsplash

Jetpack Compose is a revolutionary update for building an android app UI. It leveraged the concept of declarative UI and brought the fun in building UI with Kotlin — a dream for many Android devs. If you’re new to Jetpack Compose I recommend you to please go through the following articles:

With that being said, let’s get started.

Introduction to Animation in Compose

As an introduction to animations in Compose, the android team has provided a tree map to choose where to use which APIs. Have a look:

Press enter or click to view image in full size
source: https://developer.android.com/jetpack/compose/animation

My intent in this article is to animate the composable when there is a visibility change.

Simple Composable Design

Let's start by creating a simple composable, we’ll have a simple circular icon designed using Box & Icon compostables and a simple Button. Have a look:

--

--