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

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

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

ImageView.setRotationX介绍

暂无

代码示例

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

@Override
public void setRotationX(float rotationX) {
  super.setRotationX(rotationX);
  invalidateParentIfNeeded();
  fireOnTransformationChangedListener();
}

代码示例来源:origin: westnordost/StreetComplete

@AnyThread public void onMapOrientation(float rotation, float tilt)
{
  getActivity().runOnUiThread(() -> {
    compassNeedle.setRotation((float) (180*rotation/Math.PI));
    compassNeedle.setRotationX((float) (180*tilt/Math.PI));
  });
}

代码示例来源: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类方法