安卓获取显示屏方向的问题

  • Post author:
  • Post category:其他


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


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



版权声明:本文为brooknew原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。