Commit 9c76f21
Animate elevation when card is picked up.
Had to adjust a tonne of the styling to make this work and look good.
Essentially, on iOS the shadows are just cast across any boundaries of the element, but with Android, you need to provide padding (or margin) for those shadows and scaling to come through.
So, instead of having a horizontal margin on the entire SortableList, I set the horizontal margin on the rows themselves. This gives plenty of room to conduct those animations and shadows.
I also added a similar scaling transform for Android, except a little smaller so we can get more of the shadow from elevation in.
I tested out different elevation ranges and this looks to be about right.1 parent f568a26 commit 9c76f21
1 file changed
+34
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
100 | 103 | | |
101 | | - | |
| 104 | + | |
102 | 105 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
111 | 122 | | |
112 | 123 | | |
113 | 124 | | |
| |||
168 | 179 | | |
169 | 180 | | |
170 | 181 | | |
171 | | - | |
| 182 | + | |
172 | 183 | | |
173 | 184 | | |
174 | 185 | | |
| |||
180 | 191 | | |
181 | 192 | | |
182 | 193 | | |
183 | | - | |
| 194 | + | |
| 195 | + | |
184 | 196 | | |
185 | 197 | | |
186 | 198 | | |
| |||
194 | 206 | | |
195 | 207 | | |
196 | 208 | | |
197 | | - | |
198 | | - | |
199 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
200 | 212 | | |
201 | 213 | | |
202 | 214 | | |
| |||
0 commit comments