本文整理了Java中android.widget.ImageView.setPivotX()
方法的一些代码示例,展示了ImageView.setPivotX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.setPivotX()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:setPivotX
暂无
代码示例来源:origin: ZieIony/Carbon
@Override
public void setPivotX(float pivotX) {
super.setPivotX(pivotX);
invalidateParentIfNeeded();
fireOnTransformationChangedListener();
}
代码示例来源:origin: heinrichreimer/material-drawer
@Override
public void onAnimationStart(Animator animation) {
imageViewProfileAvatarSecondary.setPivotX(0);
imageViewProfileAvatarSecondary.setPivotY(0);
}
代码示例来源:origin: DingMouRen/DingDingMap
@Override
public void setRotateAnchorPoints() {
image.setPivotX(buttonRadius - imageRect.left);
image.setPivotY(buttonRadius - imageRect.top);
}
代码示例来源:origin: yll2wcf/book
public void rotateClick(View view) {
//利用ObjectAnimator实现旋转动画
iv.setPivotX(iv.getWidth()/2);
iv.setPivotY(iv.getHeight()/2);
ObjectAnimator.ofFloat(iv, "rotation", 0, 360)
.setDuration(1000).start();
}
}
代码示例来源:origin: yll2wcf/book
public void scaleClick(View view) {
//利用AnimatorSet和ObjectAnimator实现缩放动画
final AnimatorSet animatorSet = new AnimatorSet();
//设置缩放的基准点
iv.setPivotX(iv.getWidth()/2);
iv.setPivotY(iv.getHeight()/2);
animatorSet.playTogether(
ObjectAnimator.ofFloat(iv, "scaleX", 1, 0,1).setDuration(5000), //X轴缩放
ObjectAnimator.ofFloat(iv, "scaleY", 1, 0,1).setDuration(5000));//Y轴缩放
animatorSet.start();
}
//位移按钮的点击事件
代码示例来源:origin: stackoverflow.com
ImageView ball;
int i = ball.getMeasuredHeight();
ObjectAnimator animation = ObjectAnimator.ofFloat(ball, "rotation", 0, 360);
animation.setDuration(10000);
ball.setPivotX(0);
ball.setPivotY(i / 2);
animation.setRepeatCount(ObjectAnimator.INFINITE);
animation.setInterpolator(new LinearInterpolator());
animation.start();
代码示例来源:origin: ronaldsmartin/Material-ViewPagerIndicator
@Override
public void onAnimationStart(Animator animation) {
super.onAnimationStart(animation);
centerSegment.setPivotX(pivotX);
centerSegment.setPivotY(pivotY);
}
代码示例来源:origin: stackoverflow.com
ImageView imageView;
imageView = addImageView(mainLayout, 200, 300, 200, 200, new OnClickListener() {
@Override
public void onClick(View v) {
imageView.setPivotX(200);
imageView.setPivotY(200);
imageView.setRotation(45);
}
});
代码示例来源:origin: ronaldsmartin/Material-ViewPagerIndicator
@Override
public void onAnimationEnd(Animator animation) {
// Reset values.
centerSegment.setVisibility(INVISIBLE);
centerSegment.setScaleX(originalScale);
centerSegment.setScaleY(originalScale);
centerSegment.setPivotX(originalPivotX);
centerSegment.setPivotY(originalPivotY);
}
});
代码示例来源:origin: DingMouRen/DingDingMap
@Override
public void setRotateAnchorPoints() {
image.setPivotX(buttonRadius - imageRect.left);
image.setPivotY(buttonRadius - imageRect.top);
text.setPivotX(buttonRadius - textRect.left);
text.setPivotY(buttonRadius - textRect.top);
}
代码示例来源:origin: DingMouRen/DingDingMap
@Override
public void setRotateAnchorPoints() {
image.setPivotX(buttonRadius - imageRect.left);
image.setPivotY(buttonRadius - imageRect.top);
text.setPivotX(trueRadius - textRect.left);
text.setPivotY(trueRadius - textRect.top);
}
代码示例来源:origin: andforce/iBeebo
@Override
public void onGlobalLayout() {
content.getViewTreeObserver().removeGlobalOnLayoutListener(this);// .removeOnGlobalLayoutListener(this);
if (ori == null) {
return;
}
int[] avatarLocation = new int[2];
avatar.getLocationOnScreen(avatarLocation);
final int transX = ori.left - avatarLocation[0];
final int transY = ori.top - avatarLocation[1];
final float scaleX = (float) ori.width() / (float) avatar.getWidth();
final float scaleY = (float) ori.height() / (float) avatar.getHeight();
avatar.setTranslationX(transX);
avatar.setTranslationY(transY);
avatar.setPivotX(0);
avatar.setPivotY(0);
avatar.setScaleX(scaleX);
avatar.setScaleY(scaleY);
avatar.animate().translationX(0).translationY(0).scaleY(1).scaleX(1).alpha(1.0f).setDuration(300);
}
});
代码示例来源:origin: 18Gray/ProCamera
float pivotX = x + iv_focus_camera.getMeasuredWidth() / 2;
float pivotY = y + iv_focus_camera.getMeasuredHeight() / 2;
iv_arraw_awb.setPivotX(pivotX);
iv_arraw_awb.setPivotY(pivotY);
objectAnimator.setDuration(1000);
代码示例来源:origin: GaoGersy/MultiSelecter
mFloatImg_1.setPivotX(mFloatImg_1.getWidth() / 2);
mFloatImg_1.setPivotY(mFloatImg_1.getHeight() / 2);
mFloatImg_1.setVisibility(View.VISIBLE);
代码示例来源:origin: AllenCoder/Recyclerview
lp.y = fromY - imageView.getHeight();
imageView.setPivotX(lp.width / 2);
imageView.setPivotY(lp.height / 2);
代码示例来源:origin: prolificinteractive/Chandelier
selectedImageView.setPivotX(0);
selectedImageView.setScaleX(sX);
selectedImageView.setTranslationX(tX);
selectedImageView.setPivotX(selectedSize);
selectedImageView.setScaleX(sX);
selectedImageView.setTranslationX(tX);
代码示例来源:origin: fookwood/Launcher3
mFolderIconImageView.setImageBitmap(mFolderIconBitmap);
if (fi.getFolder() != null) {
mFolderIconImageView.setPivotX(fi.getFolder().getPivotXForIconAnimation());
mFolderIconImageView.setPivotY(fi.getFolder().getPivotYForIconAnimation());
代码示例来源:origin: klinker24/launcher3
mFolderIconImageView.setImageBitmap(mFolderIconBitmap);
if (fi.getFolder() != null) {
mFolderIconImageView.setPivotX(fi.getFolder().getPivotXForIconAnimation());
mFolderIconImageView.setPivotY(fi.getFolder().getPivotYForIconAnimation());
代码示例来源:origin: WeAreFairphone/FP2-Launcher
mFolderIconImageView.setImageBitmap(mFolderIconBitmap);
if (fi.getFolder() != null) {
mFolderIconImageView.setPivotX(fi.getFolder().getPivotXForIconAnimation());
mFolderIconImageView.setPivotY(fi.getFolder().getPivotYForIconAnimation());
代码示例来源:origin: klinker24/Android-Blur-Launcher
mFolderIconImageView.setImageBitmap(mFolderIconBitmap);
if (fi.getFolder() != null) {
mFolderIconImageView.setPivotX(fi.getFolder().getPivotXForIconAnimation());
mFolderIconImageView.setPivotY(fi.getFolder().getPivotYForIconAnimation());
内容来源于网络,如有侵权,请联系作者删除!