android.widget.ImageView.setRotationY()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(155)

本文整理了Java中android.widget.ImageView.setRotationY()方法的一些代码示例,展示了ImageView.setRotationY()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.setRotationY()方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:setRotationY

ImageView.setRotationY介绍

暂无

代码示例

代码示例来源:origin: jaydenxiao2016/AndroidFire

@Override
public void onMove(boolean finished, boolean automatic, int moved) {
  if (!finished) {
    ivVs.setRotationY(moved / (float) mHeight * 360);
  } else {
    ivVs.setRotationY(moved / (float) mHeight * 360);
  }
}

代码示例来源:origin: jaydenxiao2016/AndroidFire

@Override
  public void onReset() {
    ivVs.setRotationY(0);
  }
}

代码示例来源:origin: ZieIony/Carbon

@Override
public void setRotationY(float rotationY) {
  super.setRotationY(rotationY);
  invalidateParentIfNeeded();
  fireOnTransformationChangedListener();
}

代码示例来源:origin: mime-mob/AndroidAdvanceAnimation

@Override
  public void onAnimationUpdate(ValueAnimator valueAnimator) {
    float f = valueAnimator.getAnimatedFraction();
    float rotate = f * 359;
    iv.setRotationY(rotate);
  }
});

代码示例来源:origin: stackoverflow.com

iv.setRotationY(270f);
iv.animate().rotationY(360f).setListener(null);

代码示例来源:origin: stackoverflow.com

frame = new FrameLayout(this);
 frame.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 700));
 ArrayList<Integer> arrayList = new ArrayList<Integer>();
 arrayList.add(R.drawable.image1);
 arrayList.add(R.drawable.image2);
 arrayList.add(R.drawable.image3);
 arrayList.add(R.drawable.image4);
 arrayList.add(R.drawable.image5);
 arrayList.add(R.drawable.image6);
 arrayList.add(R.drawable.image7);
 arrayList.add(R.drawable.image8);
 arrayList.add(R.drawable.image9);
 arrayList.add(R.drawable.image10);
 //arrayList.add(R.drawable.image11);
 for(int i=0;i<arrayList.size();i++){
   ImageView imgvw = new ImageView(this);
   imgvw.setImageResource(arrayList.get(i));
   imgvw.setLayoutParams(new ActionBar.LayoutParams(250, 400));
   imgvw.setScaleType(ImageView.ScaleType.FIT_XY);
   imgvw.setX(this.getResources().getDisplayMetrics().widthPixels / 2);
   imgvw.setRotationY(-45);
   imgvw.setScaleY(0.7f);
   frame.addView(imgvw);
 }
 setContentView(frame);

代码示例来源:origin: microbit-foundation/microbit-blue

@Override
  public void run() {
    ((TextView) AccelerometerActivity.this.findViewById(R.id.accel_x)).setText("X: " + String.format("%.3f", accel_data[0]));
    ((TextView) AccelerometerActivity.this.findViewById(R.id.accel_y)).setText("Y: " + String.format("%.3f", accel_data[1]));
    ((TextView) AccelerometerActivity.this.findViewById(R.id.accel_z)).setText("Z: " + String.format("%.3f", accel_data[2]));
    ((TextView) AccelerometerActivity.this.findViewById(R.id.pitch)).setText("PITCH: " + String.format("%.1f", pitch));
    ((TextView) AccelerometerActivity.this.findViewById(R.id.roll)).setText("ROLL: " + String.format("%.1f", roll));
    ((ImageView) AccelerometerActivity.this.findViewById(R.id.microbit)).setRotationX((float) roll);
    ((ImageView) AccelerometerActivity.this.findViewById(R.id.microbit)).setRotationY((float) pitch);
  }
});

相关文章

ImageView类方法