1
0
mirror of https://gitlab.com/openlp/android.git synced 2024-12-22 20:02:50 +00:00

Fix rotation

This commit is contained in:
Tim Bentley 2015-05-29 21:47:42 +01:00
parent b36fbf3d50
commit b7e29a7f5f
2 changed files with 17 additions and 1 deletions

View File

@ -14,7 +14,7 @@
<activity <activity
android:name=".OpenLP" android:name=".OpenLP"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="landscape"> android:configChanges="orientation|screenSize">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@ -20,6 +20,7 @@ package org.openlp.android2;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarActivity;
import android.app.ActionBar; import android.app.ActionBar;
@ -91,6 +92,21 @@ public class OpenLP extends ActionBarActivity
} }
} }
/**
* Handle configuration change.
*
* @param newConfig The new Config.
*/
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
/**
* Handle the selection of the Navigation Menu
*
* @param position Which item has been selected.
*/
@Override @Override
public void onNavigationDrawerItemSelected(int position) { public void onNavigationDrawerItemSelected(int position) {
// update the main content by replacing fragments // update the main content by replacing fragments