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


Java ViewCompat.setPivotY方法代码示例

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


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

示例2: 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

示例3: handleRightPage

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void handleRightPage(View view, float position) {
    ViewCompat.setTranslationX(view, -view.getWidth() * position);

    ViewCompat.setPivotX(view, view.getWidth() * 0.5f);
    ViewCompat.setPivotY(view, view.getHeight() * 0.5f);
    ViewCompat.setScaleX(view, 1 - position);
    ViewCompat.setScaleY(view, 1 - position);
    ViewCompat.setAlpha(view, 1 - position);
}
 
开发者ID:weileng11,项目名称:KUtils-master,代码行数:11,代码来源:ZoomFadePageTransformer.java

示例4: handleRightPage

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void handleRightPage(View view, float position) {
    ViewCompat.setTranslationX(view, -view.getWidth() * position);

    ViewCompat.setPivotX(view, view.getWidth() * 0.5f);
    ViewCompat.setPivotY(view, view.getHeight() * 0.5f);
    ViewCompat.setScaleX(view, 1 + position);
    ViewCompat.setScaleY(view, 1 + position);

    if (position > 0.95f) {
        ViewCompat.setAlpha(view, 0);
    } else {
        ViewCompat.setAlpha(view, 1);
    }
}
 
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:16,代码来源:ZoomStackPageTransformer.java

示例5: handleLeftPage

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void handleLeftPage(View view, float position) {
    ViewCompat.setTranslationX(view, -view.getWidth() * position);

    ViewCompat.setPivotX(view, view.getWidth() * 0.5f);
    ViewCompat.setPivotY(view, view.getHeight() * 0.5f);
    ViewCompat.setScaleX(view, 1 + position);
    ViewCompat.setScaleY(view, 1 + position);

    if (position < -0.95f) {
        ViewCompat.setAlpha(view, 0);
    } else {
        ViewCompat.setAlpha(view, 1);
    }
}
 
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:16,代码来源:ZoomCenterPageTransformer.java

示例6: handleLeftPage

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void handleLeftPage(View view, float position) {
    ViewCompat.setTranslationX(view, -view.getWidth() * position);

    ViewCompat.setPivotX(view, view.getWidth() * 0.5f);
    ViewCompat.setPivotY(view, view.getHeight() * 0.5f);
    ViewCompat.setScaleX(view, 1 + position);
    ViewCompat.setScaleY(view, 1 + position);

    ViewCompat.setAlpha(view, 1 + position);
}
 
开发者ID:devzwy,项目名称:KUtils,代码行数:12,代码来源:ZoomFadePageTransformer.java

示例7: play

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private BaseViewAnimator play() {
    animator.setTarget(target);

    if (pivotX == YoYo.CENTER_PIVOT) {
        ViewCompat.setPivotX(target, target.getMeasuredWidth() / 2.0f);
    } else {
        target.setPivotX(pivotX);
    }
    if (pivotY == YoYo.CENTER_PIVOT) {
        ViewCompat.setPivotY(target, target.getMeasuredHeight() / 2.0f);
    } else {
        target.setPivotY(pivotY);
    }

    animator.setDuration(duration)
            .setRepeatTimes(repeatTimes)
            .setRepeatMode(repeatMode)
            .setInterpolator(interpolator)
            .setStartDelay(delay);

    if (callbacks.size() > 0) {
        for (Animator.AnimatorListener callback : callbacks) {
            animator.addAnimatorListener(callback);
        }
    }
    animator.animate();
    return animator;
}
 
开发者ID:weileng11,项目名称:KUtils-master,代码行数:29,代码来源:YoYo.java

示例8: handleLeftPage

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void handleLeftPage(View view, float position) {
    float rotation = (mMaxRotation * position);
    ViewCompat.setPivotX(view, view.getMeasuredWidth() * 0.5f);
    ViewCompat.setPivotY(view, view.getMeasuredHeight());
    ViewCompat.setRotation(view, rotation);
}
 
开发者ID:weileng11,项目名称:KUtils-master,代码行数:8,代码来源:RotatePageTransformer.java

示例9: 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);
}
 
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:7,代码来源:CubePageTransformer.java

示例10: 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);
}
 
开发者ID:devzwy,项目名称:NeiHanDuanZiTV,代码行数:7,代码来源:CubePageTransformer.java


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