今天学习apiDemo 这里面还是有很多值得借鉴的东西的 不用从网上乱找
text 显示的一些特效:
从下方推入:
<?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android"><translate android:fromYDelta="100%p" android:toYDelta="0" android:duration="300"/><alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
</set>
左边推入
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"><translate android:fromXDelta="100%p" android:toXDelta="0" android:duration="300"/><alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
</set>
3D旋转动画:
Rotate3dAnimation rotation;if (mPosition > -1) {mPhotosList.setVisibility(View.GONE);mImageView.setVisibility(View.VISIBLE);mImageView.requestFocus();rotation = new Rotate3dAnimation(90, 180, centerX, centerY, 310.0f, false);} else {mImageView.setVisibility(View.GONE);mPhotosList.setVisibility(View.VISIBLE);mPhotosList.requestFocus();rotation = new Rotate3dAnimation(90, 0, centerX, centerY, 310.0f, false);}rotation.setDuration(500);rotation.setFillAfter(true);rotation.setInterpolator(new DecelerateInterpolator());mContainer.startAnimation(rotation);