Fix large screens (GalaxyTab), New option to hide the status bar

This commit is contained in:
shagrath 2010-11-07 21:45:13 +01:00
parent 7086117dbd
commit ce9f55cf82
7 changed files with 26 additions and 3 deletions

View file

@ -201,6 +201,8 @@
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">

View file

@ -1,3 +1,3 @@
#Thu Aug 12 23:34:07 CEST 2010
#Sun Nov 07 21:28:20 CET 2010
eclipse.preferences.version=1
environment/project/0.331530184=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<environment append\="true" appendContributed\="true">\n<variable delimiter\="\:" name\="PATH" operation\="append" value\="/home/shagrath/DEV/android-ndk-r4-crystax"/>\n</environment>\n

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.ab.x48" android:installLocation="auto" android:versionName="1.25.1" android:versionCode="26">
package="org.ab.x48" android:installLocation="auto" android:versionName="1.27" android:versionCode="27">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".X48"
android:label="@string/app_name"

View file

@ -44,4 +44,6 @@
<string name="large_width_summary">Portrait mode only</string>
<string name="show_lite_keyb">Minimal controls</string>
<string name="show_lite_keyb_summary">Also, easy shortcut: touch the LCD</string>
<string name="full_screen">Hide the status bar</string>
<string name="full_screen_summary">Full screen mode</string>
</resources>

View file

@ -75,8 +75,10 @@ public class HPView extends SurfaceView implements SurfaceHolder.Callback, Runna
// mBackgroundImageLand = BitmapFactory.decodeResource(x48.getResources(), R.drawable.skin_landscape);
//mBackgroundImage = BitmapFactory.decodeResource(x48.getResources(), R.drawable.skin);
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inScaled = false;
for(int i=0;i<MAX_TOUCHES;i++) {
keys[i] = BitmapFactory.decodeResource(x48.getResources(), R.drawable.k01 + i);
keys[i] = BitmapFactory.decodeResource(x48.getResources(), R.drawable.k01 + i, opts);
}
paint = new Paint();

View file

@ -50,6 +50,14 @@ public class Settings extends PreferenceActivity {
keybLitePref.setDefaultValue(false);
inlinePrefCat.addPreference(keybLitePref);
CheckBoxPreference fullScreenPref = new CheckBoxPreference(this);
fullScreenPref.setKey("fullScreen");
fullScreenPref.setTitle(R.string.full_screen);
fullScreenPref.setSummary(R.string.full_screen_summary);
fullScreenPref.setDefaultValue(false);
inlinePrefCat.addPreference(fullScreenPref);
ListPreference listPref = new ListPreference(this);
listPref.setEntries(R.array.contrast_entries);
listPref.setEntryValues(R.array.contrast_values);

View file

@ -19,6 +19,7 @@ import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.view.WindowManager.LayoutParams;
public class X48 extends Activity {
@ -82,6 +83,14 @@ public class X48 extends Activity {
mainView.setFullWidth(mPrefs.getBoolean("large_width", false));
mainView.setKeybLite(mPrefs.getBoolean("keybLite", false));
}
if (mPrefs.getBoolean("fullScreen", false)) {
getWindow().addFlags(LayoutParams.FLAG_FULLSCREEN);
getWindow().clearFlags(LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
} else {
getWindow().addFlags(LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
getWindow().clearFlags(LayoutParams.FLAG_FULLSCREEN);
}
mainView.requestLayout();
}
public void changeKeybLite() {