diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-08-26 16:05:38 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-08-26 16:05:38 +0200 |
commit | 76cbb4f72751ec6255aa40b72218db80ea6d9472 (patch) | |
tree | 092f9bd00495e0c610682f90a2c3a56ff388a920 /src/main/java/eu/siacs | |
parent | e33d8451a899bd014ef5b142289c3c1c35c989bd (diff) |
some multi-window optimizations. set min width to 300
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/MagicCreateActivity.java | 4 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/WelcomeActivity.java | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/MagicCreateActivity.java b/src/main/java/eu/siacs/conversations/ui/MagicCreateActivity.java index 1b16e565..f0c72295 100644 --- a/src/main/java/eu/siacs/conversations/ui/MagicCreateActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/MagicCreateActivity.java @@ -1,6 +1,7 @@ package eu.siacs.conversations.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/eu/siacs/conversations/ui/WelcomeActivity.java b/src/main/java/eu/siacs/conversations/ui/WelcomeActivity.java index 78f0f609..3c837b94 100644 --- a/src/main/java/eu/siacs/conversations/ui/WelcomeActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/WelcomeActivity.java @@ -2,6 +2,7 @@ package eu.siacs.conversations.ui; import android.app.Activity; import android.content.Intent; +import android.content.pm.ActivityInfo; import android.os.Bundle; import android.view.View; import android.widget.Button; @@ -12,6 +13,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); final Button createAccount = (Button) findViewById(R.id.create_account); |