How to view Jetpack Compose Animation Preview?
Asked Answered
M

2

5

In https://developer.android.com/jetpack/compose/animation#tooling, it is stated we can preview Animation in Android Studio.

As per this diagram (taken from the Google Developer Document link above)

enter image description here

However, when I load the latest Android Studio Bumblebee 2021.1.1 Patch 1

I cannot see it at all (as per the diagram below). Where is it? Did I miss anything? (I try to search help, I cannot find it as well

enter image description here

Mckinnon answered 9/2, 2022 at 11:4 Comment(0)
E
4

You need to enable an Experimental option in the Android Studio settings

See documentation

enter image description here

Egeria answered 9/2, 2022 at 11:26 Comment(1)
There is no longer an Experimental option for this setting. You can view animation previews by tapping the "Start Interactive Mode" button in the top right of a Preview on the Design pane.Compline
L
4

In Android Studio Giraffe | 2022.3.1 Patch 1 (built on August 17, 2023), you need to hover over the Composable header in the Preview window to see the additional buttons. Otherwise they are invisible. And there is a button "Animation Preview" which opens the window you need.

Note that you can have multiple Composables in the Preview window, so you need to hover over the Composable title you need, not the window itself.

Also note that you can run the Animation Preview window only if you are not in the Interactive Mode.

The screenshot was taken in the new UI, but I think the same is true in the old interface.

enter image description here

Lamothe answered 22/8, 2023 at 9:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.