Skip to content

Replace Lottie Android with KMP alternative #336

@Kaaveh

Description

@Kaaveh

Context

Lottie (com.airbnb.android:lottie-compose:6.7.1) is Android-only. It's used for the empty state animation in the favorites tab.

Affected files

  • library/designsystem/src/main/java/.../LottieAnimationComposable.kt — wrapper composable
  • library/designsystem/src/main/java/.../EmptyStateAnimation.kt — uses LottieCompositionSpec.RawRes(R.raw.empty_state_animation)
  • library/designsystem/src/main/res/raw/empty_state_animation.json — animation JSON

Options

Option Pros Cons
Compottie (io.github.nicholasmata:compottie) KMP Lottie, similar API Newer library, less battle-tested
expect/actual wrapper Keep existing Android impl Need iOS implementation separately
Replace with static illustration No dependency Loses animation

What needs to happen

  1. Choose a replacement approach
  2. Update libs.versions.toml with new dependency
  3. Rewrite LottieAnimationComposable.kt using new library or expect/actual
  4. Move animation JSON to CMP resources directory (or expect/actual resource loading)
  5. Update EmptyStateAnimation.kt to use new API

Acceptance Criteria

  • No com.airbnb.android:lottie-compose dependency in shared modules
  • Empty state animation still works on Android
  • Compiles for non-Android targets

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions