背景
开发中,有时需要获取当前屏幕的方向,所以单独写了个demo,方便大家参考。
效果:
Demo源代码:
https://gitee.com/cxyzy1/screenOrientation.git
Manifest文件中配置activity时,需要配置:
<code>android:configChanges="orientation|screenSize"</code>
背景
开发中,有时需要获取当前屏幕的方向,所以单独写了个demo,方便大家参考。
效果:
Demo源代码:
https://gitee.com/cxyzy1/screenOrientation.git
Manifest文件中配置activity时,需要配置:
<code>android:configChanges="orientation|screenSize"</code>