New option to block sensor orientation
This commit is contained in:
parent
09c540c896
commit
0886edcdef
3 changed files with 7 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.ab.x48" android:installLocation="auto" android:versionCode="73" android:versionName="1.73">
|
package="org.ab.x48" android:installLocation="auto" android:versionCode="74" android:versionName="1.74">
|
||||||
<application android:icon="@drawable/icon" android:label="@string/app_name">
|
<application android:icon="@drawable/icon" android:label="@string/app_name">
|
||||||
<activity android:name=".X48"
|
<activity android:name=".X48"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
|
|
@ -53,11 +53,11 @@ public class Settings extends PreferenceActivity {
|
||||||
savePref.setSummary(R.string.saveonexit_msgbox_value);
|
savePref.setSummary(R.string.saveonexit_msgbox_value);
|
||||||
inlinePrefCat.addPreference(savePref);
|
inlinePrefCat.addPreference(savePref);
|
||||||
|
|
||||||
/*CheckBoxPreference blockOrientation = new CheckBoxPreference(this);
|
CheckBoxPreference blockOrientation = new CheckBoxPreference(this);
|
||||||
blockOrientation.setKey("blockOrientation");
|
blockOrientation.setKey("blockOrientation");
|
||||||
blockOrientation.setTitle(R.string.blockorientation_msgbox);
|
blockOrientation.setTitle(R.string.blockorientation_msgbox);
|
||||||
blockOrientation.setSummary(R.string.blockorientation_msgboxvalue);
|
blockOrientation.setSummary(R.string.blockorientation_msgboxvalue);
|
||||||
inlinePrefCat.addPreference(blockOrientation);*/
|
inlinePrefCat.addPreference(blockOrientation);
|
||||||
|
|
||||||
CheckBoxPreference keybLitePref = new CheckBoxPreference(this);
|
CheckBoxPreference keybLitePref = new CheckBoxPreference(this);
|
||||||
keybLitePref.setKey("keybLite");
|
keybLitePref.setKey("keybLite");
|
||||||
|
|
|
@ -14,6 +14,7 @@ import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.SharedPreferences.Editor;
|
import android.content.SharedPreferences.Editor;
|
||||||
|
import android.content.pm.ActivityInfo;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
@ -133,10 +134,10 @@ public class X48 extends Activity {
|
||||||
|
|
||||||
public void checkPrefs() {
|
public void checkPrefs() {
|
||||||
SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
/*if (mPrefs.getBoolean("blockOrientation", false))
|
if (mPrefs.getBoolean("blockOrientation", false))
|
||||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR);
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR);
|
||||||
else
|
else
|
||||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);*/
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
|
||||||
bitmapSkin = mPrefs.getBoolean("bitmapskin", false);
|
bitmapSkin = mPrefs.getBoolean("bitmapskin", false);
|
||||||
String port1 = mPrefs.getString("port1", "0");
|
String port1 = mPrefs.getString("port1", "0");
|
||||||
managePort(1, port1);
|
managePort(1, port1);
|
||||||
|
@ -152,7 +153,7 @@ public class X48 extends Activity {
|
||||||
}
|
}
|
||||||
if (mainView != null) {
|
if (mainView != null) {
|
||||||
mainView.backBuffer = null;
|
mainView.backBuffer = null;
|
||||||
mainView.needFlip = true;
|
mainView.needFlip = true;
|
||||||
mainView.setHapticFeedbackEnabled(mPrefs.getBoolean("haptic", true));
|
mainView.setHapticFeedbackEnabled(mPrefs.getBoolean("haptic", true));
|
||||||
mainView.setFullWidth(mPrefs.getBoolean("large_width", false));
|
mainView.setFullWidth(mPrefs.getBoolean("large_width", false));
|
||||||
mainView.setScaleControls(mPrefs.getBoolean("scale_buttons", false));
|
mainView.setScaleControls(mPrefs.getBoolean("scale_buttons", false));
|
||||||
|
|
Loading…
Reference in a new issue