本文整理匯總了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);
}
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}