Adding task switching animation xmls for further tweaking. (Bug 16656169)
Change-Id: I472116cb3d86a3f90a935b2a3ac058ffc2ac1b5d
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2014, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="normal">
|
||||
|
||||
<alpha android:fromAlpha="1.0" android:toAlpha="0.6"
|
||||
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/accelerate_cubic"
|
||||
android:duration="133"/>
|
||||
|
||||
<translate android:fromYDelta="0" android:toYDelta="10%"
|
||||
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/accelerate_cubic"
|
||||
android:duration="350"/>
|
||||
|
||||
<scale android:fromXScale="1.0" android:toXScale="0.9"
|
||||
android:fromYScale="1.0" android:toYScale="0.9"
|
||||
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
|
||||
android:pivotX="50%p" android:pivotY="50%p"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"
|
||||
android:duration="350" />
|
||||
|
||||
<alpha android:fromAlpha="1.0" android:toAlpha="1.6666666666"
|
||||
android:fillEnabled="true" android:fillBefore="false" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/decelerate_cubic"
|
||||
android:startOffset="350"
|
||||
android:duration="133"/>
|
||||
|
||||
<translate android:fromYDelta="0%" android:toYDelta="-8.8888888888%"
|
||||
android:fillEnabled="true" android:fillBefore="false" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/decelerate_cubic"
|
||||
android:startOffset="350"
|
||||
android:duration="350"/>
|
||||
|
||||
<scale android:fromXScale="1.0" android:toXScale="1.1111111111"
|
||||
android:fromYScale="1.0" android:toYScale="1.1111111111"
|
||||
android:fillEnabled="true" android:fillBefore="false" android:fillAfter="true"
|
||||
android:pivotX="50%p" android:pivotY="50%p"
|
||||
android:interpolator="@android:interpolator/decelerate_cubic"
|
||||
android:startOffset="350"
|
||||
android:duration="350" />
|
||||
</set>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2014, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="normal">
|
||||
|
||||
<alpha android:fromAlpha="1.0" android:toAlpha="0.6"
|
||||
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/accelerate_cubic"
|
||||
android:duration="150"/>
|
||||
|
||||
<scale android:fromXScale="1.0" android:toXScale="0.9"
|
||||
android:fromYScale="1.0" android:toYScale="0.9"
|
||||
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
|
||||
android:pivotX="50%p" android:pivotY="50%p"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"
|
||||
android:duration="300" />
|
||||
</set>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2014, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="top">
|
||||
|
||||
<translate android:fromYDelta="110%" android:toYDelta="0%"
|
||||
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/decelerate_quint"
|
||||
android:startOffset="50"
|
||||
android:duration="250" />
|
||||
</set>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2014, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="top">
|
||||
|
||||
<translate android:fromYDelta="0%" android:toYDelta="10%"
|
||||
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/decelerate_quint"
|
||||
android:duration="300" />
|
||||
|
||||
<translate android:fromYDelta="10%" android:toYDelta="0%"
|
||||
android:fillEnabled="true" android:fillBefore="false" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/accelerate_quint"
|
||||
android:startOffset="300"
|
||||
android:duration="300" />
|
||||
</set>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2014, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="top">
|
||||
|
||||
<translate android:fromYDelta="0%" android:toYDelta="110%"
|
||||
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/accelerate_quint"
|
||||
android:duration="300" />
|
||||
</set>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2014, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="normal">
|
||||
|
||||
<alpha android:fromAlpha="0.6" android:toAlpha="1.0"
|
||||
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/decelerate_cubic"
|
||||
android:startOffset="75"
|
||||
android:duration="150"/>
|
||||
|
||||
<scale android:fromXScale="0.9" android:toXScale="1.0"
|
||||
android:fromYScale="0.9" android:toYScale="1.0"
|
||||
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/linear_out_slow_in"
|
||||
android:pivotX="50%p" android:pivotY="50%p"
|
||||
android:startOffset="75"
|
||||
android:duration="225" />
|
||||
</set>
|
||||
@@ -190,10 +190,14 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
|
||||
Task.TaskKey toTaskKey;
|
||||
if (showNextTask) {
|
||||
toTaskKey = group.getNextTaskInGroup(task);
|
||||
// XXX: We will actually set the appropriate launch animations here
|
||||
launchOpts = ActivityOptions.makeCustomAnimation(mContext,
|
||||
R.anim.recents_launch_next_affiliated_task_target,
|
||||
R.anim.recents_launch_next_affiliated_task_source);
|
||||
} else {
|
||||
toTaskKey = group.getPrevTaskInGroup(task);
|
||||
// XXX: We will actually set the appropriate launch animations here
|
||||
launchOpts = ActivityOptions.makeCustomAnimation(mContext,
|
||||
R.anim.recents_launch_prev_affiliated_task_target,
|
||||
R.anim.recents_launch_prev_affiliated_task_source);
|
||||
}
|
||||
if (toTaskKey != null) {
|
||||
toTask = stack.findTaskWithId(toTaskKey.id);
|
||||
@@ -204,7 +208,11 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
|
||||
|
||||
// Return early if there is no next task
|
||||
if (toTask == null) {
|
||||
// XXX: We will actually show a bounce animation here
|
||||
if (showNextTask) {
|
||||
// XXX: Show the next-task bounce animation
|
||||
} else {
|
||||
// XXX: Show the prev-task bounce animation
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user