Merge pull request #2027 from mfietz/issue/2023-2024-rotation

Retain context menues and dialogs on rotation
This commit is contained in:
Martin Fietz 2016-07-23 10:44:30 +02:00 committed by GitHub
commit 30a9d0f5f3
2 changed files with 8 additions and 6 deletions

View File

@ -45,7 +45,7 @@
<activity
android:name=".activity.MainActivity"
android:configChanges="keyboardHidden|orientation"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:label="@string/app_name">
<intent-filter>
@ -83,7 +83,7 @@
<activity
android:name=".activity.PreferenceActivityGingerbread"
android:configChanges="keyboardHidden|orientation"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/settings_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
@ -92,7 +92,7 @@
<activity
android:name=".activity.PreferenceActivity"
android:configChanges="keyboardHidden|orientation"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/settings_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
@ -148,6 +148,7 @@
</activity>
<activity
android:name=".activity.AboutActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/about_pref">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
@ -162,12 +163,12 @@
</activity>
<activity
android:name=".activity.OpmlImportFromPathActivity"
android:configChanges="keyboardHidden|orientation"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/opml_import_label">
</activity>
<activity
android:name=".activity.OpmlImportFromIntentActivity"
android:configChanges="keyboardHidden|orientation"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/opml_import_label">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
@ -219,7 +220,7 @@
<activity
android:name=".activity.OnlineFeedViewActivity"
android:configChanges="orientation"
android:configChanges="orientation|screenSize"
android:label="@string/add_feed_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"

View File

@ -103,6 +103,7 @@ public class PreferenceActivity extends AppCompatActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(true);
addPreferencesFromResource(R.xml.preferences);
PreferenceActivity activity = instance.get();
if(activity != null && activity.preferenceController != null) {