mirror of
https://github.com/rfc2822/GfxTablet
synced 2025-10-03 09:39:16 +02:00
Merge 3e0289d0ec
into 8fc163f875
This commit is contained in:
commit
71dc40b46c
4 changed files with 11 additions and 5 deletions
|
@ -5,6 +5,7 @@
|
|||
<string name="menu_settings">Settings</string>
|
||||
<string name="preferences_host_title">Network host</string>
|
||||
<string name="stylus_preference">Sense stylus only</string>
|
||||
<string name="fullscreen_preference">Fullscreen</string>
|
||||
<string name="menu_about">About / Help</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<CheckBoxPreference android:title="@string/stylus_preference" android:key="stylus_only_preference" android:defaultValue="false"/>
|
||||
<CheckBoxPreference android:title="@string/fullscreen_preference" android:key="fullscreen_preference" android:defaultValue="true"/>
|
||||
</PreferenceScreen>
|
||||
|
|
|
@ -16,7 +16,7 @@ import android.widget.LinearLayout;
|
|||
|
||||
public class CanvasActivity extends Activity {
|
||||
CanvasView canvas;
|
||||
SharedPreferences prefs;
|
||||
SharedPreferences settings;
|
||||
NetworkClient netClient;
|
||||
|
||||
@Override
|
||||
|
@ -26,9 +26,12 @@ public class CanvasActivity extends Activity {
|
|||
PreferenceManager.setDefaultValues(this, R.xml.network_preferences, false);
|
||||
PreferenceManager.setDefaultValues(this, R.xml.drawing_preferences, false);
|
||||
|
||||
settings = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
if (settings.getBoolean(SettingsActivity.KEY_PREF_FULLSCREEN, true)) {
|
||||
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
||||
WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
}
|
||||
|
||||
setContentView(R.layout.activity_canvas);
|
||||
LinearLayout layout = (LinearLayout)findViewById(R.id.canvas_layout);
|
||||
|
|
|
@ -12,7 +12,8 @@ import at.bitfire.gfxtablet.R;
|
|||
public class SettingsActivity extends PreferenceActivity {
|
||||
public static final String
|
||||
KEY_PREF_HOST = "host_preference",
|
||||
KEY_PREF_STYLUS_ONLY = "stylus_only_preference";
|
||||
KEY_PREF_STYLUS_ONLY = "stylus_only_preference",
|
||||
KEY_PREF_FULLSCREEN = "fullscreen_preference";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue