Apparently TopBar elevation property is animated. Meaning that if 4dp elevation is set, when the view appears its elevation is animated from 0dp to 4dp. This resulted in rare race condition where the onAnimationEnd callback was called after we set the desired elevation value, and an unexpected elevation value was set.
|
|
||
1 |
|
1 |
|
2 |
|
2 |
|
3 |
|
3 |
|
|
4 |
|
|
4 |
|
5 |
|
5 |
|
6 |
|
6 |
|
7 |
|
|
|
||
10 |
|
11 |
|
11 |
|
12 |
|
12 |
|
13 |
|
|
14 |
|
|
13 |
|
15 |
|
14 |
|
16 |
|
15 |
|
17 |
|
16 |
|
18 |
|
17 |
|
19 |
|
18 |
|
20 |
|
|
21 |
|
|
19 |
|
22 |
|
20 |
|
23 |
|
21 |
|
24 |
|
|
|
||
2 |
|
2 |
|
3 |
|
3 |
|
4 |
|
4 |
|
5 |
|
|
|
6 |
|
5 |
|
7 |
|
6 |
|
8 |
|
7 |
|
|
|
||
20 |
|
19 |
|
21 |
|
20 |
|
22 |
|
21 |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
23 |
|
25 |
|
24 |
|
26 |
|
25 |
|
27 |
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
|
|
28 |
|
|
32 |
|
29 |
|
33 |
|
|
|
34 |
|
30 |
|
35 |
|
31 |
|
36 |
|
|
|
|
32 |
|
|
37 |
|
33 |
|
38 |
|
34 |
|
39 |
|
|
|
40 |
|
|
|
|
35 |
|
|
|
36 |
|
|
41 |
|
37 |
|
42 |
|
|
|
|
38 |
|
|
|
39 |
|
|
43 |
|
40 |
|
44 |
|
41 |
|
45 |
|
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
46 |
|
52 |
|
47 |
|
53 |
|
48 |
|
|
|
|
54 |
|
|
49 |
|
55 |
|
50 |
|
56 |
|