android 加速度计,Android加速度计问题

public int getRotation ()

Returns the rotation of the screen from its “natural” orientation. The

returned value may be Surface.ROTATION_0 (no rotation),

Surface.ROTATION_90, Surface.ROTATION_180, or Surface.ROTATION_270.

For example, if a device has a naturally tall screen, and the user has

turned it on its side to go into a landscape orientation, the value

returned here may be either Surface.ROTATION_90 or

Surface.ROTATION_270 depending on the direction it was turned. The

angle is the rotation of the drawn graphics on the screen, which is

the opposite direction of the physical rotation of the device. For

example, if the device is rotated 90 degrees counter-clockwise, to

compensate rendering will be rotated by 90 degrees clockwise and thus

the returned value here will be Surface.ROTATION_90.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值