Commit 66bc2fb
[a11y] Adding reduce motion logic to LottieAnimation for compose usage (#2542)
Our changes in #2536 didn't work for `LottieAnimation` in compose. While LottieAnimation does use LottieDrawable, it has it's own animator and draws on canvas directly.
This PR addresses that issue by making some logic of reduce motion readable outside LottieDrawable and consuming that logic in `LottieAnimation`
I tested this by adding a sample lottie file with reduce motion marker locally, see the attached video.
https://github.com/user-attachments/assets/eb33333f-86b8-46fa-9bbb-82bff8a8c7fe
Co-authored-by: Pranay Airan <[email protected]>1 parent a1fb304 commit 66bc2fb
File tree
2 files changed
+16
-8
lines changed- lottie-compose/src/main/java/com/airbnb/lottie/compose
- lottie/src/main/java/com/airbnb/lottie
2 files changed
+16
-8
lines changedLines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| |||
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
134 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
135 | 142 | | |
136 | 143 | | |
137 | 144 | | |
| |||
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
823 | 823 | | |
824 | 824 | | |
825 | 825 | | |
826 | | - | |
| 826 | + | |
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
834 | | - | |
| 834 | + | |
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
| |||
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
856 | | - | |
| 856 | + | |
| 857 | + | |
857 | 858 | | |
858 | 859 | | |
859 | 860 | | |
| |||
885 | 886 | | |
886 | 887 | | |
887 | 888 | | |
888 | | - | |
| 889 | + | |
889 | 890 | | |
890 | 891 | | |
891 | 892 | | |
892 | 893 | | |
893 | 894 | | |
894 | 895 | | |
895 | 896 | | |
896 | | - | |
| 897 | + | |
897 | 898 | | |
898 | 899 | | |
899 | 900 | | |
| |||
1244 | 1245 | | |
1245 | 1246 | | |
1246 | 1247 | | |
1247 | | - | |
| 1248 | + | |
1248 | 1249 | | |
1249 | 1250 | | |
1250 | 1251 | | |
1251 | 1252 | | |
1252 | | - | |
| 1253 | + | |
1253 | 1254 | | |
1254 | 1255 | | |
1255 | 1256 | | |
| |||
0 commit comments