安卓獲取顯示屏方向的問題

int displayRotation = this.getWindowManager().getDefaultDisplay().getRotation();
Configuration cf = this.getResources().getConfiguration();
在系統禁止屏旋轉時,返回的都是垂直模式。參考:

https://www.xuebuyuan.com/3254209.html

發佈了108 篇原創文章 · 獲贊 29 · 訪問量 31萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章