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


Java ViewCompat.getScaleX方法代码示例

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


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

示例1: startScaleDownReturnToStartAnimation

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void startScaleDownReturnToStartAnimation(int from,
                                                  Animation.AnimationListener listener) {
    mFrom = from;
    if (isAlphaUsedForScale()) {
        mStartingScale = mRefreshView.getAlpha();
    } else {
        mStartingScale = ViewCompat.getScaleX(mRefreshView);
    }
    mScaleDownToStartAnimation = new Animation() {
        @Override
        public void applyTransformation(float interpolatedTime, Transformation t) {
            float targetScale = (mStartingScale + (-mStartingScale  * interpolatedTime));
            setAnimationProgress(targetScale);
            moveToStart(interpolatedTime);
        }
    };
    mScaleDownToStartAnimation.setDuration(SCALE_DOWN_DURATION);
    if (listener != null) {
        mScaleDownToStartAnimation.setAnimationListener(listener);
    }
    mRefreshView.clearAnimation();
    mRefreshView.startAnimation(mScaleDownToStartAnimation);
}
 
开发者ID:Bvin,项目名称:gesture-refresh-layout,代码行数:24,代码来源:GestureRefreshLayout.java

示例2: startScaleDownReturnToStartAnimation

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void startScaleDownReturnToStartAnimation(int from,
        AnimationListener listener) {
    mFrom = from;
    if (isAlphaUsedForScale()) {
        mStartingScale = mProgress.getAlpha();
    } else {
        mStartingScale = ViewCompat.getScaleX(mCircleView);
    }
    mScaleDownToStartAnimation = new Animation() {
        @Override
        public void applyTransformation(float interpolatedTime, Transformation t) {
            float targetScale = (mStartingScale + (-mStartingScale  * interpolatedTime));
            setAnimationProgress(targetScale);
            moveToStart(interpolatedTime);
        }
    };
    mScaleDownToStartAnimation.setDuration(SCALE_DOWN_DURATION);
    if (listener != null) {
        mCircleView.setAnimationListener(listener);
    }
    mCircleView.clearAnimation();
    mCircleView.startAnimation(mScaleDownToStartAnimation);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:24,代码来源:SwipeRefreshLayout.java

示例3: startScaleDownReturnToStartAnimation

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void startScaleDownReturnToStartAnimation(int from,
                                                  AnimationListener listener) {
    mFrom = from;
    mStartingScale = ViewCompat.getScaleX(mHeadViewContainer);
    mScaleDownToStartAnimation = new Animation() {
        @Override
        public void applyTransformation(float interpolatedTime,
                                        Transformation t) {
            float targetScale = (mStartingScale + (-mStartingScale * interpolatedTime));
            setAnimationProgress(targetScale);
            moveToStart(interpolatedTime);
        }
    };
    mScaleDownToStartAnimation.setDuration(SCALE_DOWN_DURATION);
    if (listener != null) {
        mHeadViewContainer.setAnimationListener(listener);
    }
    mHeadViewContainer.clearAnimation();
    mHeadViewContainer.startAnimation(mScaleDownToStartAnimation);
}
 
开发者ID:FreeSunny,项目名称:Amazing,代码行数:21,代码来源:SuperSwipeRefreshLayout.java

示例4: startScaleDownReturnToStartAnimation

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void startScaleDownReturnToStartAnimation(final CircleImageView view, int from,
                                                  Animation.AnimationListener listener) {
    mFrom = from;
    if (isAlphaUsedForScale()) {
        mStartingScale = view == tCircleView ? tProgress.getAlpha() : bProgress.getAlpha();
    } else {
        mStartingScale = ViewCompat.getScaleX(view);
    }
    mScaleDownToStartAnimation = new Animation() {
        @Override
        public void applyTransformation(float interpolatedTime, Transformation t) {
            float targetScale = (mStartingScale + (-mStartingScale * interpolatedTime));
            setAnimationProgress(view, targetScale);
            moveToStart(interpolatedTime);
        }
    };
    mScaleDownToStartAnimation.setDuration(SCALE_DOWN_DURATION);
    if (listener != null) {
        view.setAnimationListener(listener);
    }
    view.clearAnimation();
    view.startAnimation(mScaleDownToStartAnimation);
}
 
开发者ID:LingjuAI,项目名称:AssistantBySDK,代码行数:24,代码来源:LingjuSwipeRefreshLayout.java

示例5: startScaleDownReturnToStartAnimation

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void startScaleDownReturnToStartAnimation(final CircleImageView view, int from,
                                                  Animation.AnimationListener listener) {
    mFrom = from;
    if (isAlphaUsedForScale()) {
        mStartingScale = bProgress.getAlpha();
    } else {
        mStartingScale = ViewCompat.getScaleX(view);
    }
    mScaleDownToStartAnimation = new Animation() {
        @Override
        public void applyTransformation(float interpolatedTime, Transformation t) {
            float targetScale = (mStartingScale + (-mStartingScale * interpolatedTime));
            setAnimationProgress(view, targetScale);
            moveToStart(interpolatedTime);
        }
    };
    mScaleDownToStartAnimation.setDuration(SCALE_DOWN_DURATION);
    if (listener != null) {
        view.setAnimationListener(listener);
    }
    view.clearAnimation();
    view.startAnimation(mScaleDownToStartAnimation);
}
 
开发者ID:LingjuAI,项目名称:AssistantBySDK,代码行数:24,代码来源:LingjuSwipeUpLoadRefreshLayout.java

示例6: startScaleDownReturnToStartAnimation

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void startScaleDownReturnToStartAnimation(int from,
        Animation.AnimationListener listener) {
    mFrom = from;
    if (isAlphaUsedForScale()) {
        mStartingScale = mProgress.getAlpha();
    } else {
        mStartingScale = ViewCompat.getScaleX(mCircleView);
    }
    mScaleDownToStartAnimation = new Animation() {
        @Override
        public void applyTransformation(float interpolatedTime, Transformation t) {
            float targetScale = (mStartingScale + (-mStartingScale  * interpolatedTime));
            setAnimationProgress(targetScale);
            moveToStart(interpolatedTime);
        }
    };
    mScaleDownToStartAnimation.setDuration(SCALE_DOWN_DURATION);
    if (listener != null) {
        mCircleView.setAnimationListener(listener);
    }
    mCircleView.clearAnimation();
    mCircleView.startAnimation(mScaleDownToStartAnimation);
}
 
开发者ID:unixzii,项目名称:android-source-codes,代码行数:24,代码来源:SwipeRefreshLayout.java

示例7: startScaleDownReturnToStartAnimation

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void startScaleDownReturnToStartAnimation(int from,
                                                  AnimationListener listener) {
    mFrom = from;
    if (isAlphaUsedForScale()) {
        mStartingScale = mProgress.getAlpha();
    } else {
        mStartingScale = ViewCompat.getScaleX(mCircleView);
    }
    mScaleDownToStartAnimation = new Animation() {
        @Override
        public void applyTransformation(float interpolatedTime, Transformation t) {
            float targetScale = (mStartingScale + (-mStartingScale * interpolatedTime));
            setAnimationProgress(targetScale);
            moveToStart(interpolatedTime);
        }
    };
    mScaleDownToStartAnimation.setDuration(SCALE_DOWN_DURATION);
    if (listener != null) {
        mCircleView.setAnimationListener(listener);
    }
    mCircleView.clearAnimation();
    mCircleView.startAnimation(mScaleDownToStartAnimation);
}
 
开发者ID:aliumujib,项目名称:SwipeToRefresh,代码行数:24,代码来源:SwipeToRefreshLayout.java

示例8: startScaleDownReturnToStartAnimation

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void startScaleDownReturnToStartAnimation(int from,
                                                  Animation.AnimationListener listener) {
    mFrom = from;
    mStartingScale = ViewCompat.getScaleX(mHeadViewContainer);
    mScaleDownToStartAnimation = new Animation() {
        @Override
        public void applyTransformation(float interpolatedTime,
                                        Transformation t) {
            float targetScale = (mStartingScale + (-mStartingScale * interpolatedTime));
            setAnimationProgress(targetScale);
            moveToStart(interpolatedTime);
        }
    };
    mScaleDownToStartAnimation.setDuration(SCALE_DOWN_DURATION);
    if (listener != null) {
        mHeadViewContainer.setAnimationListener(listener);
    }
    mHeadViewContainer.clearAnimation();
    mHeadViewContainer.startAnimation(mScaleDownToStartAnimation);
}
 
开发者ID:GaoGersy,项目名称:MultiSelecter,代码行数:21,代码来源:SuperSwipeRefreshLayout.java

示例9: startScaleDownReturnToStartAnimation

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void startScaleDownReturnToStartAnimation(int from, AnimationListener listener) {
    this.mFrom = from;
    if (isAlphaUsedForScale()) {
        this.mStartingScale = (float) this.mProgress.getAlpha();
    } else {
        this.mStartingScale = ViewCompat.getScaleX(this.mCircleView);
    }
    this.mScaleDownToStartAnimation = new Animation() {
        public void applyTransformation(float interpolatedTime, Transformation t) {
            SwipeRefreshLayout.this.setAnimationProgress(SwipeRefreshLayout.this.mStartingScale + ((-SwipeRefreshLayout.this.mStartingScale) * interpolatedTime));
            SwipeRefreshLayout.this.moveToStart(interpolatedTime);
        }
    };
    this.mScaleDownToStartAnimation.setDuration(150);
    if (listener != null) {
        this.mCircleView.setAnimationListener(listener);
    }
    this.mCircleView.clearAnimation();
    this.mCircleView.startAnimation(this.mScaleDownToStartAnimation);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:21,代码来源:SwipeRefreshLayout.java

示例10: getActiveCardPosition

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
/**
 * @return active card position or RecyclerView.NO_POSITION
 */
public int getActiveCardPosition() {
    if (scrollRequestedPosition != RecyclerView.NO_POSITION) {
        return scrollRequestedPosition;
    } else {
        int result = RecyclerView.NO_POSITION;

        View biggestView = null;
        float lastScaleX = 0f;

        for (int i = 0, cnt = getChildCount(); i < cnt; i++) {
            final View child = getChildAt(i);
            final int viewLeft = getDecoratedLeft(child);
            if (viewLeft >= activeCardRight) {
                continue;
            }

            final float scaleX = ViewCompat.getScaleX(child);
            if (lastScaleX < scaleX && viewLeft < activeCardCenter) {
                lastScaleX = scaleX;
                biggestView = child;
            }
        }

        if (biggestView != null) {
            result = getPosition(biggestView);
        }

        return result;
    }
}
 
开发者ID:Ramotion,项目名称:cardslider-android,代码行数:34,代码来源:CardSliderLayoutManager.java

示例11: retrieveOriginalScale

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void retrieveOriginalScale(RecyclerView.ViewHolder holder) {
    mOriginalScaleX = ViewCompat.getScaleX(holder.itemView);
    mOriginalScaleY = ViewCompat.getScaleY(holder.itemView);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:ScaleInOutItemAnimator.java

示例12: isClosed

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
public boolean isClosed() {
    return ViewCompat.getScaleX(back) == SCALE_CLOSED;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:ExpandingFragment.java

示例13: startScaleDownReturnToStartAnimation

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
private void startScaleDownReturnToStartAnimation(int from,
                                                      AnimationListener listener) {
        mFrom = from;
        mStartingScale = ViewCompat.getScaleX(mHeadViewContainer);
        mScaleDownToStartAnimation = new Animation() {
            @Override
            public void applyTransformation(float interpolatedTime,
                                            Transformation t) {
                float targetScale = (mStartingScale + (-mStartingScale * interpolatedTime));
                setAnimationProgress(targetScale);
                moveToStart(interpolatedTime);
            }
        };
        mScaleDownToStartAnimation.setDuration(SCALE_DOWN_DURATION);
        if (listener != null) {
            mHeadViewContainer.setAnimationListener(listener);
        }
        mHeadViewContainer.clearAnimation();
        mHeadViewContainer.startAnimation(mScaleDownToStartAnimation);
    } 
开发者ID:xiaoshanlin000,项目名称:SLTableView,代码行数:21,代码来源:SuperSwipeRefreshLayout.java


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