Merge "More snazzy animation for UX happiness." into nyc-dev
am: a45612b777
* commit 'a45612b7776edd2b8cd516c5ea78247e906d02af':
More snazzy animation for UX happiness.
This commit is contained in:
@@ -13,10 +13,23 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:valueFrom="1"
|
android:ordering="together">
|
||||||
android:valueTo="0"
|
|
||||||
android:propertyName="position"
|
<objectAnimator
|
||||||
android:valueType="floatType"
|
android:valueFrom="0f"
|
||||||
android:duration="@android:integer/config_mediumAnimTime"
|
android:valueTo="1f"
|
||||||
android:interpolator="@android:interpolator/decelerate_quad" />
|
android:propertyName="alpha"
|
||||||
|
android:valueType="floatType"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime"
|
||||||
|
android:interpolator="@android:interpolator/decelerate_quad" />
|
||||||
|
|
||||||
|
<objectAnimator
|
||||||
|
android:propertyName="position"
|
||||||
|
android:valueFrom="1"
|
||||||
|
android:valueTo="0"
|
||||||
|
android:valueType="floatType"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime"
|
||||||
|
android:interpolator="@android:interpolator/decelerate_quad" />
|
||||||
|
|
||||||
|
</set>
|
||||||
|
|||||||
@@ -13,10 +13,23 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:valueFrom="0"
|
android:ordering="together">
|
||||||
android:valueTo="1"
|
|
||||||
android:propertyName="position"
|
<objectAnimator
|
||||||
android:valueType="floatType"
|
android:valueFrom="1f"
|
||||||
android:duration="@android:integer/config_mediumAnimTime"
|
android:valueTo="0f"
|
||||||
android:interpolator="@android:interpolator/accelerate_quad" />
|
android:propertyName="alpha"
|
||||||
|
android:valueType="floatType"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime"
|
||||||
|
android:interpolator="@android:interpolator/decelerate_quad" />
|
||||||
|
|
||||||
|
<objectAnimator
|
||||||
|
android:valueFrom="0"
|
||||||
|
android:valueTo="1"
|
||||||
|
android:propertyName="position"
|
||||||
|
android:valueType="floatType"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime"
|
||||||
|
android:interpolator="@android:interpolator/accelerate_quad" />
|
||||||
|
|
||||||
|
</set>
|
||||||
22
packages/DocumentsUI/res/animator/fade_in.xml
Normal file
22
packages/DocumentsUI/res/animator/fade_in.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<!-- Copyright (C) 2013 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:valueFrom="0f"
|
||||||
|
android:valueTo="1f"
|
||||||
|
android:propertyName="alpha"
|
||||||
|
android:valueType="floatType"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime"
|
||||||
|
android:interpolator="@android:interpolator/decelerate_quad" />
|
||||||
22
packages/DocumentsUI/res/animator/fade_out.xml
Normal file
22
packages/DocumentsUI/res/animator/fade_out.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<!-- Copyright (C) 2013 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:valueFrom="1f"
|
||||||
|
android:valueTo="0f"
|
||||||
|
android:propertyName="alpha"
|
||||||
|
android:valueType="floatType"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime"
|
||||||
|
android:interpolator="@android:interpolator/decelerate_quad" />
|
||||||
@@ -46,7 +46,7 @@ public class DirectoryView extends LinearLayout {
|
|||||||
|
|
||||||
public void setPosition(float position) {
|
public void setPosition(float position) {
|
||||||
mPosition = position;
|
mPosition = position;
|
||||||
setX((mWidth > 0) ? (mPosition * mWidth) : 0);
|
setY((mWidth > 0) ? (mPosition * mWidth) : 0);
|
||||||
|
|
||||||
if (mPosition != 0) {
|
if (mPosition != 0) {
|
||||||
setTranslationZ(getResources().getDimensionPixelSize(R.dimen.dir_elevation));
|
setTranslationZ(getResources().getDimensionPixelSize(R.dimen.dir_elevation));
|
||||||
|
|||||||
@@ -1491,10 +1491,10 @@ public class DirectoryFragment extends Fragment
|
|||||||
break;
|
break;
|
||||||
case ANIM_ENTER:
|
case ANIM_ENTER:
|
||||||
args.putBoolean(Shared.EXTRA_IGNORE_STATE, true);
|
args.putBoolean(Shared.EXTRA_IGNORE_STATE, true);
|
||||||
ft.setCustomAnimations(R.animator.dir_enter, R.animator.dir_frozen);
|
ft.setCustomAnimations(R.animator.dir_enter, R.animator.fade_out);
|
||||||
break;
|
break;
|
||||||
case ANIM_LEAVE:
|
case ANIM_LEAVE:
|
||||||
ft.setCustomAnimations(R.animator.dir_frozen, R.animator.dir_leave);
|
ft.setCustomAnimations(R.animator.fade_in, R.animator.dir_leave);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user