Skip to content

Add RTL support to lottie-android#2663

Merged
gpeal merged 3 commits intoairbnb:masterfrom
nrchan:master
Sep 29, 2025
Merged

Add RTL support to lottie-android#2663
gpeal merged 3 commits intoairbnb:masterfrom
nrchan:master

Conversation

@nrchan
Copy link
Copy Markdown
Contributor

@nrchan nrchan commented Sep 25, 2025

This commit add support for RTL languages to Lottie Android.
As mentioned in issue #2658 and #2279, Lottie Android doesn't connect Arabic character, and render it from left to right.

This commit mainly resolve these two issues:

  • Consider text direction using Bidi class from Java
  • Connect Arabic text by rendering them together

Before:
484380078-21aeabec-a128-4037-8599-7bcbfef6e457
After:
截圖 2025-09-25 16 20 17
Same text on browser:

  • مرحبا
  • مَرْحَبًا٣٢١ One واحد Two اتنين
  • لكلِّ فرد الحقُّ في الحياة والحرِّية وفي الأمان على شخصه.
  • שלום
  • שָׁלוֹם One אחד Two שניים
  • כל אדם יש לו הזכות לחיים, לחירות ולביטחון אישי.

@nrchan
Copy link
Copy Markdown
Contributor Author

nrchan commented Sep 25, 2025

This is the test result from file found in #2279

Screen_recording_20250925_164105.mp4

Copy link
Copy Markdown
Collaborator

@gpeal gpeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this. Could you add some test animations here so they get captured by the snapshot tests?

@github-actions
Copy link
Copy Markdown

Snapshot Tests
API 23: Report Diff
API 35: Report Diff

@github-actions
Copy link
Copy Markdown

Snapshot Tests
API 23: Report Diff
API 35: Report Diff

Copy link
Copy Markdown
Collaborator

@gpeal gpeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

@gpeal gpeal merged commit 3ac73ed into airbnb:master Sep 29, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants