当前位置: 首页>>代码示例>>Java>>正文


Java ViewCompat.setRotationX方法代码示例

本文整理汇总了Java中android.support.v4.view.ViewCompat.setRotationX方法的典型用法代码示例。如果您正苦于以下问题:Java ViewCompat.setRotationX方法的具体用法?Java ViewCompat.setRotationX怎么用?Java ViewCompat.setRotationX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.v4.view.ViewCompat的用法示例。


在下文中一共展示了ViewCompat.setRotationX方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
    }
}
 
开发者ID:devzwy,项目名称:KUtils,代码行数:20,代码来源:BGABannerUtil.java

示例2: preAnimateAddImpl

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public boolean preAnimateAddImpl() {
	if (DatabaseConfiguration.subItemSpecificAnimation) {
		ViewCompat.setRotationX(itemView, 90);
		return true;
	}
	return false;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:AnimatorSubItem.java

示例3: clear

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private static void clear(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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:FlexibleItemAnimator.java

示例4: reset

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
/**
 * reset the view to default status
 *
 * @param target
 */
public void reset(View target) {
    ViewCompat.setAlpha(target, 1);
    ViewCompat.setScaleX(target, 1);
    ViewCompat.setScaleY(target, 1);
    ViewCompat.setTranslationX(target, 0);
    ViewCompat.setTranslationY(target, 0);
    ViewCompat.setRotation(target, 0);
    ViewCompat.setRotationY(target, 0);
    ViewCompat.setRotationX(target, 0);
}
 
开发者ID:devzwy,项目名称:KUtils,代码行数:16,代码来源:BaseViewAnimator.java

示例5: clear

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
public static void clear(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);
}
 
开发者ID:angcyo,项目名称:RLibrary,代码行数:14,代码来源:ViewHelper.java

示例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);
}
 
开发者ID:LightSun,项目名称:android-util2,代码行数:18,代码来源:AnimUtils.java

示例7: preAnimateAddImpl

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
protected boolean preAnimateAddImpl(final RecyclerView.ViewHolder holder) {
	ViewCompat.setRotationX(holder.itemView, 90);
	return true;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:FlipInTopXAnimator.java

示例8: preAnimateAddImpl

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
protected boolean preAnimateAddImpl(final RecyclerView.ViewHolder holder) {
	ViewCompat.setRotationX(holder.itemView, -90);
	return true;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:FlipInBottomXAnimator.java

示例9: onRemoveCanceled

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
protected void onRemoveCanceled(ViewHolder holder) {
	ViewCompat.setRotationX(holder.itemView, 0);
	ViewCompat.setTranslationY(holder.itemView, 0);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:GarageDoorItemAnimator.java

示例10: prepHolderForAnimateAdd

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
protected boolean prepHolderForAnimateAdd(ViewHolder holder) {
	ViewCompat.setRotationX(holder.itemView, 90);
	ViewCompat.setTranslationY(holder.itemView, -(holder.itemView.getMeasuredHeight() / 2));
	return true;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:GarageDoorItemAnimator.java

示例11: onAddCanceled

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
protected void onAddCanceled(ViewHolder holder) {
	ViewCompat.setRotationX(holder.itemView, 0);
	ViewCompat.setTranslationY(holder.itemView, 0);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:GarageDoorItemAnimator.java

示例12: onTouchEvent

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public boolean onTouchEvent(MotionEvent e) {
    if (isOpenMenu) {
        return super.onTouchEvent(e);
    }

    switch (e.getAction()) {
        case MotionEvent.ACTION_MOVE:
            mCurrentY = e.getY();
            float dy = mCurrentY - mTouchY;
            dy = Math.min(mHeadHeight*2, dy);
            dy = Math.max(0, dy);
            if (mChildView != null) {
                float offsetY = decelerateInterpolator.getInterpolation(dy / mHeadHeight/2 ) * dy/2 ;
                float fraction = offsetY / mHeadHeight;
                mHeadLayout.getLayoutParams().height = (int) offsetY;
                mHeadLayout.requestLayout();
                ViewCompat.setRotationX(mHeadLayout,90*(1.0f-fraction));
                ViewCompat.setTranslationY(mChildView, offsetY);
                mHeadLayout.setPivotX(mHeadLayout.getWidth()/2);
                mHeadLayout.setPivotY(offsetY);

            }
            return true;
        case MotionEvent.ACTION_CANCEL:
        case MotionEvent.ACTION_UP:
            if (mChildView != null) {
                if (ViewCompat.getTranslationY(mChildView) >= mHeadHeight) {
                    createAnimatorTranslationY(mChildView, mHeadHeight, mHeadLayout);
                    isOpenMenu = true;
                } else {
                    createAnimatorToHeadView(mHeadLayout,ViewCompat.getRotationX(mHeadLayout));
                    this.postDelayed(new Runnable() {
                        @Override
                        public void run() {
                            createAnimatorTranslationY(mChildView, 0, mHeadLayout);
                        }
                    },50);
                }
            }
            return true;
    }
    return super.onTouchEvent(e);
}
 
开发者ID:zongkaili,项目名称:MenuSet,代码行数:45,代码来源:PerseiLayout.java

示例13: preAnimateAddImpl

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
protected void preAnimateAddImpl(RecyclerView.ViewHolder holder) {
    ViewCompat.setRotationX(holder.itemView, 90);
}
 
开发者ID:angcyo,项目名称:RLibrary,代码行数:5,代码来源:FlipInTopXAnimator.java

示例14: preAnimateAddImpl

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
protected void preAnimateAddImpl(RecyclerView.ViewHolder holder) {
    ViewCompat.setRotationX(holder.itemView, -90);
}
 
开发者ID:angcyo,项目名称:RLibrary,代码行数:5,代码来源:FlipInBottomXAnimator.java


注:本文中的android.support.v4.view.ViewCompat.setRotationX方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。