一些与屏幕有关的基础知识: //这个是手机屏幕的旋转角度 final int rotation = this.getWindowManager().getDefaultDisplay().getOrientation(); rotation值有: Surface.ROTATION_0 Surface.ROTATION_90 Surface.ROTATION_180 Surface.ROTATION_270 //这个是读取当前Activity 的屏幕方向 final int orientation…
<body> <div id="doc"></div> <div id="model"></div> <script> let a = 0; if ('orientation' in screen) { document.getElementById('doc').textContent = `屏幕旋转了${a}次.`; document.getElementById('model').text…