本文整理汇总了Java中android.support.v4.view.ViewCompat.setRotationY方法的典型用法代码示例。如果您正苦于以下问题:Java ViewCompat.setRotationY方法的具体用法?Java ViewCompat.setRotationY怎么用?Java ViewCompat.setRotationY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v4.view.ViewCompat
的用法示例。
在下文中一共展示了ViewCompat.setRotationY方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resetPageTransformer
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
public static void resetPageTransformer(List<? extends View> views) {
if (views == null) {
return;
}
for (View view : views) {
view.setVisibility(View.VISIBLE);
ViewCompat.setAlpha(view, 1);
ViewCompat.setPivotX(view, view.getMeasuredWidth() * 0.5f);
ViewCompat.setPivotY(view, view.getMeasuredHeight() * 0.5f);
ViewCompat.setTranslationX(view, 0);
ViewCompat.setTranslationY(view, 0);
ViewCompat.setScaleX(view, 1);
ViewCompat.setScaleY(view, 1);
ViewCompat.setRotationX(view, 0);
ViewCompat.setRotationY(view, 0);
ViewCompat.setRotation(view, 0);
}
}
示例2: drawChild
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
boolean result;
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
final int save = canvas.save(Canvas.ALL_SAVE_FLAG);
if (mCanSlide && !lp.slideable && mSlideableView != null) {
canvas.scale(1.5f - 0.5f * mSlideOffset, 1.5f - 0.5f * mSlideOffset, child.getRight(), getHeight() / 2);
} else {
canvas.scale(1 - mSlideOffset / 5, 1 - mSlideOffset / 5, mSlideableView.getLeft(), getHeight() / 2);
ViewCompat.setRotationY(child, -10 * mSlideOffset);
}
result = super.drawChild(canvas, child, drawingTime);
canvas.restoreToCount(save);
return result;
}
示例3: onRemoveCanceled
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
protected void onRemoveCanceled(ViewHolder holder) {
ViewCompat.setRotationY(holder.itemView, 0);
ViewCompat.setTranslationX(holder.itemView, 0);
ViewCompat.setScaleX(holder.itemView, 1);
ViewCompat.setScaleY(holder.itemView, 1);
}
示例4: handleRightPage
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void handleRightPage(View view, float position) {
ViewCompat.setTranslationX(view, -view.getWidth() * position);
float rotation = (ROTATION * position);
ViewCompat.setRotationY(view, rotation);
if (position < 0.5) {
view.setVisibility(View.VISIBLE);
} else {
view.setVisibility(View.INVISIBLE);
}
}
示例5: handleLeftPage
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void handleLeftPage(View view, float position) {
ViewCompat.setTranslationX(view, -view.getWidth() * position);
float rotation = (ROTATION * position);
ViewCompat.setRotationY(view, rotation);
if (position > -0.5) {
view.setVisibility(View.VISIBLE);
} else {
view.setVisibility(View.INVISIBLE);
}
}
示例6: clearAnimator
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
/**
* clear the animator of the target view.
* @param v the target view
*/
public static void clearAnimator(View v){
ViewCompat.setAlpha(v, 1);
ViewCompat.setScaleY(v, 1);
ViewCompat.setScaleX(v, 1);
ViewCompat.setTranslationY(v, 0);
ViewCompat.setTranslationX(v, 0);
ViewCompat.setRotation(v, 0);
ViewCompat.setRotationY(v, 0);
ViewCompat.setRotationX(v, 0);
ViewCompat.setPivotY(v, v.getMeasuredHeight() / 2);
ViewCompat.setPivotX(v, v.getMeasuredWidth() / 2);
ViewCompat.animate(v).setInterpolator(null).setStartDelay(0);
}
示例7: prepHolderForAnimateAdd
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
protected boolean prepHolderForAnimateAdd(ViewHolder holder) {
ViewCompat.setTranslationX(holder.itemView, -(holder.itemView.getMeasuredWidth() / 2));
ViewCompat.setRotationY(holder.itemView, -90);
return true;
}
示例8: onAddCanceled
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
protected void onAddCanceled(ViewHolder holder) {
ViewCompat.setRotationY(holder.itemView, 0);
ViewCompat.setTranslationX(holder.itemView, 0);
}
示例9: handleInvisiblePage
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void handleInvisiblePage(View view, float position) {
ViewCompat.setPivotX(view, view.getMeasuredWidth());
ViewCompat.setPivotY(view, view.getMeasuredHeight() * 0.5f);
ViewCompat.setRotationY(view, 0);
}
示例10: handleLeftPage
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void handleLeftPage(View view, float position) {
ViewCompat.setPivotX(view, view.getMeasuredWidth());
ViewCompat.setPivotY(view, view.getMeasuredHeight() * 0.5f);
ViewCompat.setRotationY(view, mMaxRotation * position);
}
示例11: handleRightPage
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void handleRightPage(View view, float position) {
ViewCompat.setPivotX(view, 0);
ViewCompat.setPivotY(view, view.getMeasuredHeight() * 0.5f);
ViewCompat.setRotationY(view, mMaxRotation * position);
}
示例12: preAnimateAddImpl
import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
protected void preAnimateAddImpl(RecyclerView.ViewHolder holder) {
ViewCompat.setRotationY(holder.itemView, -90);
}