本文整理了Java中android.widget.ImageView.setRotationX()
方法的一些代码示例,展示了ImageView.setRotationX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.setRotationX()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称: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);
}
});
内容来源于网络,如有侵权,请联系作者删除!