some multi-window optimizations. set min width to 300

This commit is contained in:
Daniel Gultsch 2016-08-26 16:05:38 +02:00
parent e33d8451a8
commit 76cbb4f727
6 changed files with 17 additions and 4 deletions

View File

@ -40,6 +40,8 @@
android:name=".ui.ConversationActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:minWidth="300dp"
android:minHeight="300dp"
android:windowSoftInputMode="stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -91,13 +93,11 @@
<activity
android:name=".ui.WelcomeActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
android:launchMode="singleTask"/>
<activity
android:name=".ui.MagicCreateActivity"
android:label="@string/create_account"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
android:launchMode="singleTask"/>
<activity
android:name=".ui.SetPresenceActivity"
android:configChanges="orientation|screenSize"

View File

@ -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);

View File

@ -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);

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="default_resource">Tablet</string>
<bool name="portrait_only">false</bool>
</resources>

View File

@ -0,0 +1,3 @@
<resources>
<dimen name="conversations_overview_width">276dp</dimen>
</resources>

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="default_resource">Phone</string>
<bool name="portrait_only">true</bool>
</resources>