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:
parent
48384ddbf5
commit
3e0289d0ec
4 changed files with 11 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue