Skip to content

Commit 3e1cf5b

Browse files
Winson ChungAndroid (Google) Code Review
authored andcommitted
Merge "Updating task and fragment transitions. (Bug 5285022)" into jb-dev
2 parents 46bba66 + bd127f0 commit 3e1cf5b

13 files changed

+411
-44
lines changed

core/res/res/anim/task_close_enter.xml renamed to core/res/res/anim-land/task_close_enter.xml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,26 @@
1818
-->
1919

2020
<set xmlns:android="http://schemas.android.com/apk/res/android"
21-
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="normal">
22-
<alpha android:fromAlpha="0" android:toAlpha="1"
21+
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="top">
22+
23+
<alpha android:fromAlpha="0" android:toAlpha="1.0"
2324
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
24-
android:interpolator="@interpolator/decelerate_cubic"
25-
android:startOffset="600"
26-
android:duration="200"/>
27-
<scale android:fromXScale="0.6" android:toXScale="1.0"
28-
android:fromYScale="0.6" android:toYScale="1.0"
29-
android:pivotX="50%p" android:pivotY="50%p"
25+
android:interpolator="@interpolator/decelerate_quad"
26+
android:startOffset="150"
27+
android:duration="350"/>
28+
29+
<translate android:fromXDelta="-140%" android:toXDelta="0"
3030
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
3131
android:interpolator="@interpolator/decelerate_cubic"
32-
android:startOffset="350"
33-
android:duration="400" />
34-
<translate android:fromYDelta="-100%" android:toYDelta="0"
35-
android:interpolator="@interpolator/decelerate_cubic"
32+
android:startOffset="150"
33+
android:duration="350"/>
34+
35+
<scale android:fromXScale=".6" android:toXScale="1.0"
36+
android:fromYScale=".6" android:toYScale="1.0"
37+
android:pivotX="50%p" android:pivotY="50%p"
3638
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
37-
android:startOffset="350"
38-
android:duration="400"/>
39+
android:interpolator="@interpolator/decelerate_quad"
40+
android:startOffset="150"
41+
android:duration="350" />
42+
3943
</set>

core/res/res/anim/task_open_exit.xml renamed to core/res/res/anim-land/task_close_exit.xml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,23 @@
2121
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="normal">
2222
<alpha android:fromAlpha="1.0" android:toAlpha="0"
2323
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
24-
android:interpolator="@interpolator/decelerate_cubic"
25-
android:duration="300"/>
24+
android:interpolator="@interpolator/accelerate_quad"
25+
android:duration="350"/>
26+
27+
<translate android:fromXDelta="0" android:toXDelta="140%"
28+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
29+
android:interpolator="@interpolator/decelerate_quad"
30+
android:duration="350"/>
31+
2632
<scale android:fromXScale="1.0" android:toXScale="0.6"
2733
android:fromYScale="1.0" android:toYScale="0.6"
28-
android:pivotX="50%p" android:pivotY="50%p"
2934
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
30-
android:interpolator="@interpolator/accelerate_quad"
31-
android:duration="500" />
32-
<translate android:fromYDelta="0" android:toYDelta="-100%"
33-
android:interpolator="@interpolator/accelerate_quad"
34-
android:duration="500"/>
35+
android:pivotX="50%p" android:pivotY="50%p"
36+
android:interpolator="@interpolator/decelerate_cubic"
37+
android:duration="350" />
3538

3639
<!-- This is needed to keep the animation running while task_open_enter completes -->
3740
<alpha android:fromAlpha="1.0" android:toAlpha="1.0"
3841
android:interpolator="@interpolator/accelerate_quad"
39-
android:duration="700" />
42+
android:duration="500" />
4043
</set>

core/res/res/anim/task_open_enter.xml renamed to core/res/res/anim-land/task_open_enter.xml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,25 @@
1919

2020
<set xmlns:android="http://schemas.android.com/apk/res/android"
2121
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="top">
22-
<scale android:fromXScale=".8" android:toXScale="1.0"
23-
android:fromYScale=".8" android:toYScale="1.0"
24-
android:pivotX="50%p" android:pivotY="50%p"
22+
23+
<alpha android:fromAlpha="0" android:toAlpha="1.0"
2524
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
2625
android:interpolator="@interpolator/decelerate_quad"
27-
android:startOffset="400"
28-
android:duration="300" />
29-
<alpha android:fromAlpha="0" android:toAlpha="1.0"
26+
android:startOffset="150"
27+
android:duration="350"/>
28+
29+
<translate android:fromXDelta="140%" android:toXDelta="0"
30+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
31+
android:interpolator="@interpolator/decelerate_cubic"
32+
android:startOffset="150"
33+
android:duration="350"/>
34+
35+
<scale android:fromXScale=".6" android:toXScale="1.0"
36+
android:fromYScale=".6" android:toYScale="1.0"
37+
android:pivotX="50%p" android:pivotY="50%p"
3038
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
3139
android:interpolator="@interpolator/decelerate_quad"
32-
android:startOffset="400"
33-
android:duration="300"/>
40+
android:startOffset="150"
41+
android:duration="350" />
42+
3443
</set>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/*
4+
** Copyright 2009, The Android Open Source Project
5+
**
6+
** Licensed under the Apache License, Version 2.0 (the "License");
7+
** you may not use this file except in compliance with the License.
8+
** You may obtain a copy of the License at
9+
**
10+
** http://www.apache.org/licenses/LICENSE-2.0
11+
**
12+
** Unless required by applicable law or agreed to in writing, software
13+
** distributed under the License is distributed on an "AS IS" BASIS,
14+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
** See the License for the specific language governing permissions and
16+
** limitations under the License.
17+
*/
18+
-->
19+
20+
<set xmlns:android="http://schemas.android.com/apk/res/android"
21+
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="normal">
22+
<alpha android:fromAlpha="1.0" android:toAlpha="0"
23+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
24+
android:interpolator="@interpolator/accelerate_quad"
25+
android:duration="350"/>
26+
27+
<translate android:fromXDelta="0" android:toXDelta="-140%"
28+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
29+
android:interpolator="@interpolator/decelerate_quad"
30+
android:duration="350"/>
31+
32+
<scale android:fromXScale="1.0" android:toXScale="0.6"
33+
android:fromYScale="1.0" android:toYScale="0.6"
34+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
35+
android:pivotX="50%p" android:pivotY="50%p"
36+
android:interpolator="@interpolator/decelerate_cubic"
37+
android:duration="350" />
38+
39+
<!-- This is needed to keep the animation running while task_open_enter completes -->
40+
<alpha android:fromAlpha="1.0" android:toAlpha="1.0"
41+
android:interpolator="@interpolator/accelerate_quad"
42+
android:duration="500" />
43+
</set>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/*
4+
** Copyright 2009, The Android Open Source Project
5+
**
6+
** Licensed under the Apache License, Version 2.0 (the "License");
7+
** you may not use this file except in compliance with the License.
8+
** You may obtain a copy of the License at
9+
**
10+
** http://www.apache.org/licenses/LICENSE-2.0
11+
**
12+
** Unless required by applicable law or agreed to in writing, software
13+
** distributed under the License is distributed on an "AS IS" BASIS,
14+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
** See the License for the specific language governing permissions and
16+
** limitations under the License.
17+
*/
18+
-->
19+
20+
<set xmlns:android="http://schemas.android.com/apk/res/android"
21+
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="top">
22+
23+
<alpha android:fromAlpha="0" android:toAlpha="1.0"
24+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
25+
android:interpolator="@interpolator/decelerate_quad"
26+
android:startOffset="150"
27+
android:duration="350"/>
28+
29+
<translate android:fromYDelta="-140%" android:toYDelta="0"
30+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
31+
android:interpolator="@interpolator/decelerate_cubic"
32+
android:startOffset="150"
33+
android:duration="350"/>
34+
35+
<scale android:fromXScale=".6" android:toXScale="1.0"
36+
android:fromYScale=".6" android:toYScale="1.0"
37+
android:pivotX="50%p" android:pivotY="50%p"
38+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
39+
android:interpolator="@interpolator/decelerate_quad"
40+
android:startOffset="150"
41+
android:duration="350" />
42+
43+
</set>

core/res/res/anim/task_close_exit.xml renamed to core/res/res/anim-port/task_close_exit.xml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,26 @@
1818
-->
1919

2020
<set xmlns:android="http://schemas.android.com/apk/res/android"
21-
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="top">
22-
<scale android:fromXScale="1.0" android:toXScale=".8"
23-
android:fromYScale="1.0" android:toYScale=".8"
24-
android:pivotX="50%p" android:pivotY="50%p"
25-
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
26-
android:interpolator="@interpolator/decelerate_cubic"
27-
android:duration="300" />
21+
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="normal">
2822
<alpha android:fromAlpha="1.0" android:toAlpha="0"
2923
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
24+
android:interpolator="@interpolator/accelerate_quad"
25+
android:duration="350"/>
26+
27+
<translate android:fromYDelta="0" android:toYDelta="140%"
28+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
29+
android:interpolator="@interpolator/decelerate_quad"
30+
android:duration="350"/>
31+
32+
<scale android:fromXScale="1.0" android:toXScale="0.6"
33+
android:fromYScale="1.0" android:toYScale="0.6"
34+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
35+
android:pivotX="50%p" android:pivotY="50%p"
3036
android:interpolator="@interpolator/decelerate_cubic"
31-
android:duration="300"/>
37+
android:duration="350" />
3238

33-
<!-- This is needed to keep the animation running while task_close_enter completes -->
39+
<!-- This is needed to keep the animation running while task_open_enter completes -->
3440
<alpha android:fromAlpha="1.0" android:toAlpha="1.0"
35-
android:duration="600" />
41+
android:interpolator="@interpolator/accelerate_quad"
42+
android:duration="500" />
3643
</set>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/*
4+
** Copyright 2009, The Android Open Source Project
5+
**
6+
** Licensed under the Apache License, Version 2.0 (the "License");
7+
** you may not use this file except in compliance with the License.
8+
** You may obtain a copy of the License at
9+
**
10+
** http://www.apache.org/licenses/LICENSE-2.0
11+
**
12+
** Unless required by applicable law or agreed to in writing, software
13+
** distributed under the License is distributed on an "AS IS" BASIS,
14+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
** See the License for the specific language governing permissions and
16+
** limitations under the License.
17+
*/
18+
-->
19+
20+
<set xmlns:android="http://schemas.android.com/apk/res/android"
21+
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="top">
22+
23+
<alpha android:fromAlpha="0" android:toAlpha="1.0"
24+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
25+
android:interpolator="@interpolator/decelerate_quad"
26+
android:startOffset="150"
27+
android:duration="350"/>
28+
29+
<translate android:fromYDelta="140%" android:toYDelta="0"
30+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
31+
android:interpolator="@interpolator/decelerate_cubic"
32+
android:startOffset="150"
33+
android:duration="350"/>
34+
35+
<scale android:fromXScale=".6" android:toXScale="1.0"
36+
android:fromYScale=".6" android:toYScale="1.0"
37+
android:pivotX="50%p" android:pivotY="50%p"
38+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
39+
android:interpolator="@interpolator/decelerate_quad"
40+
android:startOffset="150"
41+
android:duration="350" />
42+
43+
</set>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/*
4+
** Copyright 2009, The Android Open Source Project
5+
**
6+
** Licensed under the Apache License, Version 2.0 (the "License");
7+
** you may not use this file except in compliance with the License.
8+
** You may obtain a copy of the License at
9+
**
10+
** http://www.apache.org/licenses/LICENSE-2.0
11+
**
12+
** Unless required by applicable law or agreed to in writing, software
13+
** distributed under the License is distributed on an "AS IS" BASIS,
14+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
** See the License for the specific language governing permissions and
16+
** limitations under the License.
17+
*/
18+
-->
19+
20+
<set xmlns:android="http://schemas.android.com/apk/res/android"
21+
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="normal">
22+
<alpha android:fromAlpha="1.0" android:toAlpha="0"
23+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
24+
android:interpolator="@interpolator/accelerate_quad"
25+
android:duration="350"/>
26+
27+
<translate android:fromYDelta="0" android:toYDelta="-140%"
28+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
29+
android:interpolator="@interpolator/decelerate_quad"
30+
android:duration="350"/>
31+
32+
<scale android:fromXScale="1.0" android:toXScale="0.6"
33+
android:fromYScale="1.0" android:toYScale="0.6"
34+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
35+
android:pivotX="50%p" android:pivotY="50%p"
36+
android:interpolator="@interpolator/decelerate_cubic"
37+
android:duration="350" />
38+
39+
<!-- This is needed to keep the animation running while task_open_enter completes -->
40+
<alpha android:fromAlpha="1.0" android:toAlpha="1.0"
41+
android:interpolator="@interpolator/accelerate_quad"
42+
android:duration="500" />
43+
</set>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/*
4+
** Copyright 2009, The Android Open Source Project
5+
**
6+
** Licensed under the Apache License, Version 2.0 (the "License");
7+
** you may not use this file except in compliance with the License.
8+
** You may obtain a copy of the License at
9+
**
10+
** http://www.apache.org/licenses/LICENSE-2.0
11+
**
12+
** Unless required by applicable law or agreed to in writing, software
13+
** distributed under the License is distributed on an "AS IS" BASIS,
14+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
** See the License for the specific language governing permissions and
16+
** limitations under the License.
17+
*/
18+
-->
19+
20+
<set xmlns:android="http://schemas.android.com/apk/res/android"
21+
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="top">
22+
23+
<alpha android:fromAlpha="0" android:toAlpha="1.0"
24+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
25+
android:interpolator="@interpolator/decelerate_quad"
26+
android:startOffset="150"
27+
android:duration="350"/>
28+
29+
<translate android:fromYDelta="-140%" android:toYDelta="0"
30+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
31+
android:interpolator="@interpolator/decelerate_cubic"
32+
android:startOffset="150"
33+
android:duration="350"/>
34+
35+
<scale android:fromXScale=".6" android:toXScale="1.0"
36+
android:fromYScale=".6" android:toYScale="1.0"
37+
android:pivotX="50%p" android:pivotY="50%p"
38+
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
39+
android:interpolator="@interpolator/decelerate_quad"
40+
android:startOffset="150"
41+
android:duration="350" />
42+
43+
</set>

0 commit comments

Comments
 (0)