mars885 / gamedge

An Android application for browsing video games and checking the latest gaming news from around the world.
Apache License 2.0
683 stars 64 forks source link

Animate game liking/unliking using animated vector drawable #144

Closed mars885 closed 1 month ago

mars885 commented 2 years ago

Before the migration to the Jetpack Compose, the action of liking & unliking a game by clicking the like button was animated using the animated vector drawable.

However, the latest version of the Jetpack Compose (1.1.1 as of now) does not support that. Consider adding it back once the support comes along.

The issue on the google issue tracker about this problem.

mars885 commented 1 month ago

The issue has been resolved by falling back to using the view implementation of the FloatingActionButton from the material components library. Since this is a view component, we can assign it the AnimatedStateListDrawable.

Inspired by this article.