本文整理了Java中android.view.ViewPropertyAnimator.rotationX()
方法的一些代码示例,展示了ViewPropertyAnimator.rotationX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ViewPropertyAnimator.rotationX()
方法的具体详情如下:
包路径:android.view.ViewPropertyAnimator
类名称:ViewPropertyAnimator
方法名:rotationX
暂无
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public ViewPropertyAnimator rotationX(float value) {
android.view.ViewPropertyAnimator n = mNative.get();
if (n != null) {
n.rotationX(value);
}
return this;
}
代码示例来源:origin: com.nineoldandroids/library
@Override
public ViewPropertyAnimator rotationX(float value) {
android.view.ViewPropertyAnimator n = mNative.get();
if (n != null) {
n.rotationX(value);
}
return this;
}
代码示例来源:origin: OCNYang/Android-Animation-Set
private void doAnimatorByViewPropertyAnimator() {
ViewPropertyAnimator viewPropertyAnimator = mPuppet.animate()
.rotationX(360f)
.alpha(0.5f)
.scaleX(3).scaleY(3)
.setInterpolator(new AccelerateDecelerateInterpolator())
.setDuration(3000)
.setStartDelay(0);
}
代码示例来源:origin: michael-rapp/ChromeLikeTabSwitcher
@Override
public final void animateRotation(@NonNull final Axis axis,
@NonNull final ViewPropertyAnimator animator,
final float angle) {
Condition.INSTANCE.ensureNotNull(axis, "The axis may not be null");
Condition.INSTANCE.ensureNotNull(animator, "The animator may not be null");
if (getOrientationInvariantAxis(axis) == Axis.DRAGGING_AXIS) {
animator.rotationY(
getTabSwitcher().getLayout() == Layout.PHONE_LANDSCAPE ? -1 * angle : angle);
} else {
animator.rotationX(
getTabSwitcher().getLayout() == Layout.PHONE_LANDSCAPE ? -1 * angle : angle);
}
}
代码示例来源:origin: Android500/AwesomeDrawer
@Override
public ViewPropertyAnimator rotationX(float value) {
android.view.ViewPropertyAnimator n = mNative.get();
if (n != null) {
n.rotationX(value);
}
return this;
}
代码示例来源:origin: kingargyle/adt-leanback-support
public static void rotationX(View view, float value) {
view.animate().rotationX(value);
}
代码示例来源:origin: yayaa/Rotatable
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
rootView.animate().rotationX(0).rotationY(0).setDuration(FIT_ANIM_TIME)
.setInterpolator(new FastOutSlowInInterpolator()).start();
}
});
代码示例来源:origin: morogoku/MTweaks-KernelAdiutorMOD
private void expand() {
mExpanded = true;
if (mArrow != null) {
mArrow.animate().rotationX(0).setDuration(500).start();
if (mAnimator != null) {
mAnimator.cancel();
}
if (mItems == null) return;
mAnimator = ValueAnimator.ofFloat(0, mItemHeight * mItems.size());
mAnimator.addUpdateListener(animation
-> setHeight(Math.round((float) animation.getAnimatedValue())));
mAnimator.setDuration(500);
mAnimator.start();
}
}
代码示例来源:origin: morogoku/MTweaks-KernelAdiutorMOD
private void collapse() {
mExpanded = false;
if (mArrow != null) {
mArrow.animate().rotationX(180).setDuration(500).start();
if (mAnimator != null) {
mAnimator.cancel();
}
if (mItems == null) return;
mAnimator = ValueAnimator.ofFloat(mItemHeight * mItems.size(), 0);
mAnimator.addUpdateListener(animation
-> setHeight(Math.round((float) animation.getAnimatedValue())));
mAnimator.setDuration(500);
mAnimator.start();
}
}
代码示例来源:origin: googlesamples/android-play-places
private void runShowActionAreaAnimation(View parent, View area) {
area.setPivotY(0.f);
area.setPivotX(parent.getWidth() / 2.f);
area.setAlpha(0.5f);
area.setRotationX(-90.f);
area.animate().rotationX(0.f).alpha(1.f).setDuration(400);
}
代码示例来源:origin: onlynight/LSearchView
/**
* Lifting view
*
* @param view The animation target
* @param baseRotation initial Rotation X in 3D space
* @param duration aniamtion duration
*/
@Deprecated
public static void liftingFromBottom(View view, float baseRotation, int duration) {
view.setRotationX(baseRotation);
view.setTranslationY(view.getHeight() / 3);
view.animate().setInterpolator(new AccelerateDecelerateInterpolator())
.setDuration(duration)
.rotationX(0)
.translationY(0)
.start();
}
}
代码示例来源:origin: googlesamples/android-BatchStepSensor
private void runShowActionAreaAnimation(View parent, View area) {
area.setPivotY(0.f);
area.setPivotX(parent.getWidth() / 2.f);
area.setAlpha(0.5f);
area.setRotationX(-90.f);
area.animate().rotationX(0.f).alpha(1.f).setDuration(400);
}
代码示例来源:origin: RealMoMo/Study_Android_Demo
private void doAnimatorByViewPropertyAnimator() {
ViewPropertyAnimator viewPropertyAnimator = mPuppet.animate()
.rotationX(360f)
.alpha(0.5f)
.scaleX(3).scaleY(3)
.setInterpolator(new AccelerateDecelerateInterpolator())
.setDuration(3000)
.setStartDelay(0);
}
代码示例来源:origin: aliumujib/Nibo
/**
* Lifting view
*
* @param view The animation target
* @param baseRotation initial Rotation X in 3D space
* @param duration aniamtion duration
*/
@Deprecated
public static void liftingFromBottom(View view, float baseRotation, int duration){
view.setRotationX(baseRotation);
view.setTranslationY(view.getHeight() / 3);
view
.animate()
.setInterpolator(new AccelerateDecelerateInterpolator())
.setDuration(duration)
.rotationX(0)
.translationY(0)
.start();
}
代码示例来源:origin: luhaoaimama1/zone-sdk
public void test2D(View view) {
switch (view.getId()) {
case R.id.zR:
iv.animate().rotation(30).start();
break;
case R.id.zYR:
iv.animate().rotationX(30).start();
break;
}
}
代码示例来源:origin: morogoku/MTweaks-KernelAdiutorMOD
private void animateLayout(final boolean collapse) {
mArrow.animate().rotationX(collapse ? 180 : 0).setDuration(500).start();
mLayoutAnimator = ValueAnimator.ofInt(collapse ? mLayoutHeight : 0, collapse ? 0 : mLayoutHeight);
mLayoutAnimator.addUpdateListener(animation
-> setLayoutParentHeight((int) animation.getAnimatedValue()));
mLayoutAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
super.onAnimationStart(animation);
mLayoutParent.setVisibility(View.VISIBLE);
}
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
mLayoutParent.setVisibility(collapse ? View.GONE : View.VISIBLE);
setLayoutParentHeight(collapse ? 0 : ViewGroup.LayoutParams.MATCH_PARENT);
mLayoutAnimator = null;
}
});
mLayoutAnimator.setDuration(500);
mLayoutAnimator.start();
}
代码示例来源:origin: aliumujib/Nibo
/**
* Lifting view
*
* @param view The animation target
* @param baseRotation initial Rotation X in 3D space
* @param duration aniamtion duration
* @param startDelay start delay before animation begin
*/
@Deprecated
public static void liftingFromBottom(View view, float baseRotation, int duration, int startDelay){
view.setRotationX(baseRotation);
view.setTranslationY(view.getHeight() / 3);
view
.animate()
.setInterpolator(new AccelerateDecelerateInterpolator())
.setDuration(duration)
.setStartDelay(startDelay)
.rotationX(0)
.translationY(0)
.start();
}
代码示例来源:origin: onlynight/LSearchView
/**
* Lifting view
*
* @param view The animation target
* @param baseRotation initial Rotation X in 3D space
* @param duration aniamtion duration
* @param startDelay start delay before animation begin
*/
@Deprecated
public static void liftingFromBottom(View view, float baseRotation, int duration, int startDelay) {
view.setRotationX(baseRotation);
view.setTranslationY(view.getHeight() / 3);
view.animate().setInterpolator(new AccelerateDecelerateInterpolator())
.setDuration(duration)
.setStartDelay(startDelay)
.rotationX(0)
.translationY(0)
.start();
}
代码示例来源:origin: onlynight/LSearchView
/**
* Lifting view
*
* @param view The animation target
* @param baseRotation initial Rotation X in 3D space
* @param fromY initial Y position of view
* @param duration aniamtion duration
* @param startDelay start delay before animation begin
*/
@Deprecated
public static void liftingFromBottom(View view, float baseRotation, float fromY, int duration, int startDelay) {
view.setRotationX(baseRotation);
view.setTranslationY(fromY);
view.animate()
.setInterpolator(new AccelerateDecelerateInterpolator())
.setDuration(duration)
.setStartDelay(startDelay)
.rotationX(0)
.translationY(0)
.start();
}
代码示例来源:origin: aliumujib/Nibo
/**
* Lifting view
*
* @param view The animation target
* @param baseRotation initial Rotation X in 3D space
* @param fromY initial Y position of view
* @param duration aniamtion duration
* @param startDelay start delay before animation begin
*/
@Deprecated
public static void liftingFromBottom(View view, float baseRotation, float fromY, int duration, int startDelay){
view.setRotationX(baseRotation);
view.setTranslationY(fromY);
view
.animate()
.setInterpolator(new AccelerateDecelerateInterpolator())
.setDuration(duration)
.setStartDelay(startDelay)
.rotationX(0)
.translationY(0)
.start();
}
内容来源于网络,如有侵权,请联系作者删除!