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


Java View.getRotation方法代码示例

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


在下文中一共展示了View.getRotation方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateWobbleState

import android.view.View; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void updateWobbleState(int visibleItemCount) {
    for (int i = 0; i < visibleItemCount; i++) {
        View child = getChildAt(i);

        if (child != null) {
            if (mMobileItemId != INVALID_ID && Boolean.TRUE != child.getTag(R.id.wobble_tag)) {
                if (i % 2 == 0)
                    animateWobble(child);
                else
                    animateWobbleInverse(child);
                child.setTag(R.id.wobble_tag, true);
            } else if (mMobileItemId == INVALID_ID && child.getRotation() != 0) {
                child.setRotation(0);
                child.setTag(R.id.wobble_tag, false);
            }
        }

    }
}
 
开发者ID:jpaijh,项目名称:TYT,代码行数:21,代码来源:DynamicGridView.java

示例2: getValue

import android.view.View; //导入方法依赖的package包/类
/**
 * This method gets the value of the named property from the View object.
 *
 * @param propertyConstant The property whose value should be returned
 * @return float The value of the named property
 */
private float getValue(int propertyConstant) {
    //final View.TransformationInfo info = mView.mTransformationInfo;
    View v = mView.get();
    if (v != null) {
        switch (propertyConstant) {
            case TRANSLATION_X:
                //return info.mTranslationX;
                return v.getTranslationX();
            case TRANSLATION_Y:
                //return info.mTranslationY;
                return v.getTranslationY();
            case ROTATION:
                //return info.mRotation;
                return v.getRotation();
            case ROTATION_X:
                //return info.mRotationX;
                return v.getRotationX();
            case ROTATION_Y:
                //return info.mRotationY;
                return v.getRotationY();
            case SCALE_X:
                //return info.mScaleX;
                return v.getScaleX();
            case SCALE_Y:
                //return info.mScaleY;
                return v.getScaleY();
            case X:
                //return v.mLeft + info.mTranslationX;
                return v.getX();
            case Y:
                //return v.mTop + info.mTranslationY;
                return v.getY();
            case ALPHA:
                //return info.mAlpha;
                return v.getAlpha();
        }
    }
    return 0;
}
 
开发者ID:junchenChow,项目名称:exciting-app,代码行数:46,代码来源:ViewPropertyAnimatorHC.java

示例3: getRotation

import android.view.View; //导入方法依赖的package包/类
public static float getRotation(View view) {
    if (View10.NEED_PROXY) {
        return View10.wrap(view).getRotation();
    } else {
        return view.getRotation();
    }
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:8,代码来源:ViewProxy.java

示例4: getValue

import android.view.View; //导入方法依赖的package包/类
private float getValue(int propertyConstant) {
    View v = (View) this.mView.get();
    if (v != null) {
        switch (propertyConstant) {
            case 1:
                return v.getTranslationX();
            case 2:
                return v.getTranslationY();
            case 4:
                return v.getScaleX();
            case 8:
                return v.getScaleY();
            case 16:
                return v.getRotation();
            case 32:
                return v.getRotationX();
            case 64:
                return v.getRotationY();
            case 128:
                return v.getX();
            case 256:
                return v.getY();
            case 512:
                return v.getAlpha();
        }
    }
    return 0.0f;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:29,代码来源:ViewPropertyAnimatorHC.java

示例5: updateView

import android.view.View; //导入方法依赖的package包/类
public void updateView(View v) {
    if (v != null) {
        this.alpha = v.getAlpha();
        this.x = v.getX();
        this.y = v.getY();
        this.z = atLeastLollipop ? v.getZ() : 0;
        this.width = v.getWidth();
        this.height = v.getHeight();
        this.expansionScaleX = v.getScaleX();
        this.expansionScaleY = v.getScaleY();
        this.dispositionAngle = v.getRotation();
        this.dispositionAngleX = v.getRotationX();
        this.dispositionAngleY = v.getRotationY();
    }
}
 
开发者ID:rjsvieira,项目名称:morphos,代码行数:16,代码来源:ViewDefault.java

示例6: getRotation

import android.view.View; //导入方法依赖的package包/类
static float getRotation(View view) {
    return view.getRotation();
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:4,代码来源:ViewHelper.java

示例7: enterWithRotation

import android.view.View; //导入方法依赖的package包/类
public static Completable enterWithRotation(final View view, final int duration, final int xOffset, final int yOffset, final int delay, final int rotation) {
    final float startingX = view.getX();
    final float startingY = view.getY();
    final float startRotation = view.getRotation();
    return animate(view, duration, delay)
            .fadeIn()
            .counterRotateBy(rotation)
            .translateBy(xOffset, yOffset)
            .onAnimationCancel(aView -> set(aView, startingX, startingY, OPAQUE, startRotation))
            .schedule();
}
 
开发者ID:0ximDigital,项目名称:Rx2Animations,代码行数:12,代码来源:RxAnimations.java

示例8: propertyChangeWhenScroll

import android.view.View; //导入方法依赖的package包/类
@Override
protected float propertyChangeWhenScroll(View itemView) {
    return itemView.getRotation();
}
 
开发者ID:SimonCherryGZ,项目名称:JewelryUI,代码行数:5,代码来源:CircleLayoutManager.java

示例9: getRotation

import android.view.View; //导入方法依赖的package包/类
public static float getRotation(View view) {
    return view.getRotation();
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:ViewCompatHC.java

示例10: getRotation

import android.view.View; //导入方法依赖的package包/类
private ObjectAnimator getRotation(View view) {
    final float startRotation = view.getRotation();
    final float endRotation = (float) Math.toDegrees(15 * (Math.PI / 180));

    return ObjectAnimator.ofFloat(view, View.ROTATION, startRotation, endRotation);
}
 
开发者ID:Appolica,项目名称:Flubber,代码行数:7,代码来源:Fall.java

示例11: get

import android.view.View; //导入方法依赖的package包/类
@Override
public Float get(View target) {
    return target.getRotation();
}
 
开发者ID:liuwei1993,项目名称:AndroidAnimationTools,代码行数:5,代码来源:ViewAnimatorBuilder.java

示例12: getProperty

import android.view.View; //导入方法依赖的package包/类
@Override
protected float getProperty(View view) {
  return view.getRotation();
}
 
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:5,代码来源:RotationAnimationPropertyUpdater.java


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