Android Screen Orientation: Landscape Back to Portrait

浪子不回头ぞ 提交于 2019-12-11 05:47:59

问题


I have designed an activity that its orientation is landscape. Also I have designed another that its orientation is portrait. When I run in my phone, there are some problems comes to when the landscape activity back to the portrait activity. Some of the layout disappear, such as below

original:

after

can anyone help me to solve this problem?Thank you so much!

<activity android:name="TestingActivity" android:screenOrientation="portrait" android:configChanges="orientation" > </activity> 
<activity android:name="Main"> 
  <intent-filter> 
    <action android:name="android.intent.action.MAIN"></action> 
    <category android:name="android.intent.category.LAUNCHER"></category> 
  </intent-filter> 
</activity> 
<activity android:name=".TestingActivity2" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:screenOrientation="landscape" />

回答1:


Your problem is in layout-portrait xml file. You can fix it by redesigning it. Please post your code.



来源:https://stackoverflow.com/questions/9678197/android-screen-orientation-landscape-back-to-portrait

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!