Ich habe zwei Aktivitäten in meiner Android App. Beim Klicken kann ich von einer Aktivität zur nächsten wechseln. Aber wenn ich vom Landscape- in den Protrait-Modus umschalte und umgekehrt, wird meine Aktivität automatisch geändert, was ich nicht erwartet habe. Ich erwarte, dass es auf der gleichen Aktivität bleibt, auch wenn es in den Hoch- oder Querformatmodus geändert wird. Also, was könnte das Problem sein?Automatische Änderung der Aktivität: Landschaft und Potrait-Modus in Android
aktualisieren
<application
android:allowBackup="true"
android:icon="@drawable/icon1"
android:label="@string/app_name"
android:logo="@drawable/icon2"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".second_main">
</activity><!-- ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
ausgelöst vorkommendes können Sie Ihren Code zeigen? Normalerweise ändert sich das Ändern von Landschaft und Potrait nicht. – Joshua
Fügen Sie Ihr Manifest hinzu – Zoe
Ich habe das Manifest hinzugefügt. @Parbbear0106 – Sanik