StupidBeauty
Read times:657Posted at:Wed Sep 25 23:14:23 2013
- no title specified

转载:Android开发11——手机横屏和竖屏与android:configChanges(转)

安卓软件中,对于屏幕的横屏和竖屏模式的锁定是以Activity为单位的。在Manifest的各个Activity的属性中指定android:screenOrientation属性可分别设置各个Activity的屏幕方向。

http://blog.sina.com.cn/s/blog_67aaf44401015zj6.html

亮点:

可在 AndroidManifest.xml 中设置 Activity android:screenOrientation 属性


<activity android:name=".AndroidLight"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

这样指定屏幕方向为竖屏。屏幕就不会自动旋转了。横屏的值时 landscape

办公室女郎

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4