static void setRotationX(View view, float rotationX) { view.setRotationX(rotationX); }
@Override public void onAnimationUpdate(ValueAnimator animation) { view.setRotationX((float)animation.getAnimatedValue()); } });
@Override public void setRotationX(float rotationX) { View targetView; if ((targetView = getTargetView()) != null){ targetView.setRotationX(rotationX); } }
@Override protected void resetFromView(@NonNull View from) { from.setAlpha(1); switch (flipDirection) { case LEFT: case RIGHT: from.setRotationY(0); break; case UP: case DOWN: from.setRotationX(0); break; } } }
@Override protected void preAnimateAddImpl(RecyclerView.ViewHolder holder) { View icon = holder.itemView.findViewById(R.id.icon); icon.setRotationX(30); View right = holder.itemView.findViewById(R.id.right); right.setPivotX(0); right.setPivotY(0); right.setRotationY(90); }
public static void reset(View view) { view.setAlpha(1); view.setScaleX(1); view.setScaleY(1); view.setTranslationX(0); view.setTranslationY(0); view.setRotation(0); view.setRotationY(0); view.setRotationX(0); }
private static void setTransforms(View view, float translationX, float translationY, float translationZ, float scaleX, float scaleY, float rotationX, float rotationY, float rotationZ) { view.setTranslationX(translationX); view.setTranslationY(translationY); ViewUtils.setTranslationZ(view, translationZ); view.setScaleX(scaleX); view.setScaleY(scaleY); view.setRotationX(rotationX); view.setRotationY(rotationY); view.setRotation(rotationZ); }
@Override public void setRotationX(float rotationX) { super.setRotationX(rotationX); invalidateParentIfNeeded(); fireOnTransformationChangedListener(); }
case ROTATION_X: v.setRotationX(value); break; case ROTATION_Y:
@Test public void rotationX() { view.setRotationX(10f); assertThat(view.getRotationX()).isEqualTo(10f); }
if (targetRotateX != UNSPECIFIED_FLOAT) child.setRotationX(floatEvaluator(mStartRotateX, targetRotateX, percent)); if (targetRotateY != UNSPECIFIED_FLOAT) child.setRotationY(floatEvaluator(mStartRotateY, targetRotateY, percent)); } else {
static void setRotationX(View view, float rotationX) { view.setRotationX(rotationX); }
@Override public void onAnimationUpdate(ValueAnimator valueAnimator) { PropertyBean propertyBean = (PropertyBean) valueAnimator.getAnimatedValue(); if (propertyBean.getBackgroundColor() != 0 && propertyBean.getBackgroundColor() != 1) { mPuppet.setBackgroundColor(propertyBean.getBackgroundColor()); } mPuppet.setRotationX(propertyBean.getRotationX()); mPuppet.getLayoutParams().height = (int) (height * propertyBean.getSize()); mPuppet.getLayoutParams().width = (int) (width * propertyBean.getSize()); mPuppet.requestLayout(); // mPuppet.postInvalidate(); } });
case ROTATION_X: v.setRotationX(value); break; case ROTATION_Y:
@Override public final void setRotation(@NonNull final Axis axis, @NonNull final AbstractItem item, final float angle) { Condition.INSTANCE.ensureNotNull(axis, "The axis may not be null"); Condition.INSTANCE.ensureNotNull(item, "The item may not be null"); View view = item.getView(); if (getOrientationInvariantAxis(axis) == Axis.DRAGGING_AXIS) { view.setRotationY( getTabSwitcher().getLayout() == Layout.PHONE_LANDSCAPE ? -1 * angle : angle); } else { view.setRotationX( getTabSwitcher().getLayout() == Layout.PHONE_LANDSCAPE ? -1 * angle : angle); } }
@Override public void onAnimationEnd(Animator animation) { // TODO Auto-generated method stub super.onAnimationEnd(animation); View view = (View) ((ObjectAnimator) animation).getTarget(); view.setRotationX(0.0f); } });
private void resetAnimatedView(View child) { child.setAlpha(1.f); child.setTranslationX(0.f); child.setTranslationY(0.f); child.setRotation(0.f); child.setRotationY(0.f); child.setRotationX(0.f); child.setScaleX(1.f); child.setScaleY(1.f); }
@Override protected void onTransform(View view, float position) { final float rotation = -180f * position; view.setAlpha(rotation > 90f || rotation < -90f ? 0f : 1f); view.setPivotX(view.getWidth() * 0.5f); view.setPivotY(view.getHeight() * 0.5f); view.setRotationX(rotation); }
private void resetViewProperty(View v) { v.setRotation(0); v.setRotationY(0); v.setRotationX(0); v.setScaleX(1f); v.setScaleY(1f); v.setAlpha(1f); }
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); }