问题
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