标签: android
我可以检查手机的屏幕是朝上还是朝下?
我想在手机正常颠倒时接收事件
答案 0 :(得分:0)
int orientation = this.getResources().getConfiguration().orientation; if (orientation == Configuration.ORIENTATION_PORTRAIT) { // code for portrait mode } else { // code for landscape mode }
回答from
并检查此answer以了解旋转情况