1
0
Fork 0
mirror of https://github.com/rfc2822/GfxTablet synced 2025-10-03 09:39:16 +02:00

Added a setting for fullscreen.

Requires a restart though.
This commit is contained in:
Kevin Li 2013-10-07 12:26:40 -04:00
parent 48384ddbf5
commit 3e0289d0ec
4 changed files with 11 additions and 5 deletions

View file

@ -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);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
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);