摘要:
先判断是否打开: intflag=Settings.System.getInt(context.getContentResolver(),Settings.System.ACCELEROMETER_ROTATION,0); 打开关闭,关闭打开: 1开启 0关闭Settings.System.putInt(context.getContentResolver(),Settings.System.ACCELEROMETER_ROTATION,flag==1?0:1); 阅读全文