diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-08-26 16:05:38 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-08-26 22:47:45 +0200 |
commit | f32064aa8272c95d8122d9d12415720a672efe5d (patch) | |
tree | 8e1c96501faff76499fd53bb8d9da6a9c41a0781 /src/main/java | |
parent | 634f461c847d5103a122b5009fe924e652e95495 (diff) |
some multi-window optimizations. set min width to 300
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java | 4 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/WelcomeActivity.java | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java b/src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java index 6927c9732..c83318160 100644 --- a/src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java +++ b/src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java @@ -1,6 +1,7 @@ package de.pixart.messenger.ui; import android.content.Intent; +import android.content.pm.ActivityInfo; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; @@ -39,6 +40,9 @@ public class MagicCreateActivity extends XmppActivity implements TextWatcher { @Override protected void onCreate(final Bundle savedInstanceState) { + if (getResources().getBoolean(R.bool.portrait_only)) { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + } super.onCreate(savedInstanceState); setContentView(R.layout.magic_create); mFullJidDisplay = (TextView) findViewById(R.id.full_jid); diff --git a/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java b/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java index 0442492d7..1297f0fd2 100644 --- a/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java +++ b/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java @@ -6,6 +6,7 @@ import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; +import android.content.pm.ActivityInfo; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.database.sqlite.SQLiteDatabase; @@ -45,6 +46,9 @@ public class WelcomeActivity extends Activity { @Override protected void onCreate(final Bundle savedInstanceState) { + if (getResources().getBoolean(R.bool.portrait_only)) { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + } super.onCreate(savedInstanceState); setContentView(R.layout.welcome); |