For example, if you want to force the software display to change the software interface as the device turns, you can use Android: screenorientation to force the software screen display direction.
Note that the red part is modified.
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.cookbook.activity_lifecycle" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="7" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".Activity_lifecycle" 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> </application></manifest>
Android: screenorientation = "Landscape" is used to determine the horizontal mode