本文整理了Java中com.nineoldandroids.view.ViewHelper.setRotationY()
方法的一些代码示例,展示了ViewHelper.setRotationY()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ViewHelper.setRotationY()
方法的具体详情如下:
包路径:com.nineoldandroids.view.ViewHelper
类名称:ViewHelper
方法名:setRotationY
ViewHelper.setRotationY介绍
暂无
代码示例
代码示例来源:origin: H07000223/FlycoBanner_Master
@Override
public void transformPage(View page, float position) {
ViewHelper.setRotationY(page, position * -30f);
}
}
代码示例来源:origin: peng8350/JPTabBar
@Override
public void onPressDown(View v, boolean selected) {
ViewHelper.setRotationY(v,selected?54f:126f);
}
代码示例来源:origin: peng8350/JPTabBar
@Override
public void onTouchOut(View v, boolean selected) {
ViewHelper.setRotationY(v,selected?180f:0f);
}
代码示例来源:origin: peng8350/JPTabBar
@Override
public void onPageAnimate(View v,float offset) {
ViewHelper.setRotationY(v, 180*offset);
}
代码示例来源:origin: myinnos/ImageSliderWithSwipes
private void setRotation(View view, float position, float percentage) {
if (position > 0) {
ViewHelper.setRotationY(view,-180 * (percentage + 1));
} else {
ViewHelper.setRotationY(view,180 * (percentage + 1));
}
}
}
代码示例来源:origin: Allure0/LMBanners
@Override
public void scrollRight(View view, float position) {
ViewHelper.setTranslationX(view, -view.getWidth() * position);
float rotation = (ROTATION * position);
ViewHelper.setRotationY(view, rotation);
if (position <0.5) {
view.setVisibility(View.VISIBLE);
} else {
view.setVisibility(View.INVISIBLE);
}
}
代码示例来源:origin: Allure0/LMBanners
@Override
public void scrollLeft(View view, float position) {
ViewHelper.setTranslationX(view, -view.getWidth() * position);
float rotation = (ROTATION * position);
ViewHelper.setRotationY(view, rotation);
if (position > -0.5) {
view.setVisibility(View.VISIBLE);
} else {
view.setVisibility(View.INVISIBLE);
}
}
代码示例来源:origin: Allure0/LMBanners
@Override
public void scrollInvisible(View view, float position) {
ViewHelper.setPivotX(view, view.getMeasuredWidth());
ViewHelper.setPivotY(view, view.getMeasuredHeight() * 0.5f);
ViewHelper.setRotationY(view, 0);
}
代码示例来源:origin: Allure0/LMBanners
@Override
public void scrollLeft(View view, float position) {
ViewHelper.setPivotX(view, view.getMeasuredWidth());
ViewHelper.setPivotY(view, view.getMeasuredHeight() * 0.5f);
ViewHelper.setRotationY(view, mMaxRotation * position);
}
代码示例来源:origin: Allure0/LMBanners
@Override
public void scrollRight(View view, float position) {
ViewHelper.setPivotX(view, 0);
ViewHelper.setPivotY(view, view.getMeasuredHeight() * 0.5f);
ViewHelper.setRotationY(view, mMaxRotation * position);
}
代码示例来源:origin: myinnos/ImageSliderWithSwipes
@Override
protected void onTransform(View view, float position) {
final float rotation = 180f * position;
ViewHelper.setAlpha(view,rotation > 90f || rotation <-90f ? 0 : 1);
ViewHelper.setPivotY(view,view.getHeight()*0.5f);
ViewHelper.setPivotX(view,view.getWidth() * 0.5f);
ViewHelper.setRotationY(view,rotation);
}
代码示例来源:origin: myinnos/ImageSliderWithSwipes
@Override
protected void onTransform(View view, float position) {
final float rotation = (position <0 ? 30f : -30f) * Math.abs(position);
ViewHelper.setTranslationX(view,getOffsetXForRotation(rotation, view.getWidth(), view.getHeight()));
ViewHelper.setPivotX(view,view.getWidth() * 0.5f);
ViewHelper.setPivotY(view,0);
ViewHelper.setRotationY(view,rotation);
}
代码示例来源:origin: Demidong/ClockView
protected void animateScroll(int position, float positionOffset)
{
if (mState != State.IDLE)
{
mRot = (float) (1 - Math.cos(2 * Math.PI * positionOffset)) / 2 * 30.0f;
ViewHelper.setRotationY(this, mState == State.GOING_RIGHT ? mRot
: -mRot);
ViewHelper.setPivotX(this, getMeasuredWidth() * 0.5f);
ViewHelper.setPivotY(this, getMeasuredHeight() * 0.5f);
}
}
代码示例来源:origin: Demidong/ClockView
private void animateCubeOut(View left, View right, float positionOffset)
{
if (mState != State.IDLE)
{
if (left != null)
{
manageLayer(left, true);
mRot = -70.0f * positionOffset;
ViewHelper.setPivotX(left, left.getMeasuredWidth());
ViewHelper.setPivotY(left, left.getMeasuredHeight() * 0.5f);
// ViewHelper.setScaleX(left,1 - positionOffset);
// ViewHelper.setScaleY(left,1 - positionOffset);
ViewHelper.setRotationY(left, mRot);
}
if (right != null)
{
manageLayer(right, true);
mRot = 70.0f * (1 - positionOffset);
ViewHelper.setPivotX(right, 0);
ViewHelper.setPivotY(right, right.getMeasuredHeight() * 0.5f);
// ViewHelper.setScaleX(right,positionOffset);
// ViewHelper.setScaleY(right,positionOffset);
ViewHelper.setRotationY(right, mRot);
}
}
}
代码示例来源:origin: Demidong/ClockView
ViewHelper.setScaleX(left,1 - positionOffset);
ViewHelper.setScaleY(left,1 - positionOffset);
ViewHelper.setRotationY(left, mRot);
ViewHelper.setScaleX(right,positionOffset);
ViewHelper.setScaleY(right,positionOffset);
ViewHelper.setRotationY(right, mRot);
代码示例来源:origin: ddwhan0123/GitFlexibleListView
/**
* reset the view to default status
*
* @param target
*/
public void reset(View target) {
ViewHelper.setAlpha(target, 1);
ViewHelper.setScaleX(target, 1);
ViewHelper.setScaleY(target, 1);
ViewHelper.setTranslationX(target, 0);
ViewHelper.setTranslationY(target, 0);
ViewHelper.setRotation(target, 0);
ViewHelper.setRotationY(target, 0);
ViewHelper.setRotationX(target, 0);
ViewHelper.setPivotX(target, target.getMeasuredWidth() / 2.0f);
ViewHelper.setPivotY(target, target.getMeasuredHeight() / 2.0f);
}
代码示例来源:origin: ddwhan0123/CuteEditTextGit
/**
* reset the view to default status
*
* @param target
*/
public void reset(View target) {
ViewHelper.setAlpha(target, 1);
ViewHelper.setScaleX(target, 1);
ViewHelper.setScaleY(target, 1);
ViewHelper.setTranslationX(target, 0);
ViewHelper.setTranslationY(target, 0);
ViewHelper.setRotation(target, 0);
ViewHelper.setRotationY(target, 0);
ViewHelper.setRotationX(target, 0);
ViewHelper.setPivotX(target, target.getMeasuredWidth() / 2.0f);
ViewHelper.setPivotY(target, target.getMeasuredHeight() / 2.0f);
}
代码示例来源:origin: huangshuyuan/UpdateDemo
public static void reset(View view) {
ViewHelper.setAlpha(view, 1);
ViewHelper.setScaleX(view, 1);
ViewHelper.setScaleY(view, 1);
ViewHelper.setTranslationX(view, 0);
ViewHelper.setTranslationY(view, 0);
ViewHelper.setRotation(view, 0);
ViewHelper.setRotationY(view, 0);
ViewHelper.setRotationX(view, 0);
}
代码示例来源:origin: H07000223/FlycoPageIndicator
public static void reset(View view) {
ViewHelper.setAlpha(view, 1);
ViewHelper.setScaleX(view, 1);
ViewHelper.setScaleY(view, 1);
ViewHelper.setTranslationX(view, 0);
ViewHelper.setTranslationY(view, 0);
ViewHelper.setRotation(view, 0);
ViewHelper.setRotationY(view, 0);
ViewHelper.setRotationX(view, 0);
}
代码示例来源:origin: H07000223/FlycoBanner_Master
public static void reset(View view) {
ViewHelper.setAlpha(view, 1);
ViewHelper.setScaleX(view, 1);
ViewHelper.setScaleY(view, 1);
ViewHelper.setTranslationX(view, 0);
ViewHelper.setTranslationY(view, 0);
ViewHelper.setRotation(view, 0);
ViewHelper.setRotationY(view, 0);
ViewHelper.setRotationX(view, 0);
}