Removed padding between text entry fields and their labels.

This commit is contained in:
akwizgran
2013-04-18 22:22:15 +01:00
parent 6b5229a390
commit 0e681b9416
9 changed files with 17 additions and 19 deletions

View File

@@ -197,13 +197,12 @@ public class HomeScreenActivity extends BriarActivity {
enterPassword = new TextView(this);
enterPassword.setGravity(CENTER);
enterPassword.setTextSize(18);
enterPassword.setPadding(10, 10, 10, 10);
enterPassword.setPadding(10, 10, 10, 0);
enterPassword.setText(R.string.enter_password);
layout.addView(enterPassword);
final EditText passwordEntry = new EditText(this);
passwordEntry.setMaxLines(1);
passwordEntry.setPadding(10, 0, 10, 10);
int inputType = TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_PASSWORD;
passwordEntry.setInputType(inputType);
passwordEntry.setOnEditorActionListener(new OnEditorActionListener() {

View File

@@ -67,7 +67,7 @@ public class SetupActivity extends BriarActivity implements OnClickListener {
TextView chooseNickname = new TextView(this);
chooseNickname.setGravity(CENTER);
chooseNickname.setTextSize(18);
chooseNickname.setPadding(10, 10, 10, 10);
chooseNickname.setPadding(10, 10, 10, 0);
chooseNickname.setText(R.string.choose_nickname);
layout.addView(chooseNickname);
@@ -86,7 +86,7 @@ public class SetupActivity extends BriarActivity implements OnClickListener {
TextView choosePassword = new TextView(this);
choosePassword.setGravity(CENTER);
choosePassword.setTextSize(18);
choosePassword.setPadding(10, 10, 10, 10);
choosePassword.setPadding(10, 10, 10, 0);
choosePassword.setText(R.string.choose_password);
layout.addView(choosePassword);
@@ -105,7 +105,7 @@ public class SetupActivity extends BriarActivity implements OnClickListener {
TextView confirmPassword = new TextView(this);
confirmPassword.setGravity(CENTER);
confirmPassword.setTextSize(18);
confirmPassword.setPadding(10, 10, 10, 10);
confirmPassword.setPadding(10, 10, 10, 0);
confirmPassword.setText(R.string.confirm_password);
layout.addView(confirmPassword);

View File

@@ -88,7 +88,7 @@ SelectContactsDialog.Listener {
TextView chooseName = new TextView(this);
chooseName.setGravity(CENTER);
chooseName.setTextSize(18);
chooseName.setPadding(10, 10, 10, 10);
chooseName.setPadding(10, 10, 10, 0);
chooseName.setText(R.string.choose_blog_name);
layout.addView(chooseName);
@@ -100,7 +100,6 @@ SelectContactsDialog.Listener {
}
};
nameEntry.setMaxLines(1);
nameEntry.setPadding(10, 0, 10, 10);
nameEntry.setInputType(TYPE_CLASS_TEXT | TYPE_TEXT_FLAG_CAP_SENTENCES);
nameEntry.setOnEditorActionListener(this);
layout.addView(nameEntry);

View File

@@ -40,6 +40,7 @@ import net.sf.briar.api.messaging.MessageId;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;
import android.text.InputType;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
@@ -138,8 +139,8 @@ implements OnItemSelectedListener, OnClickListener {
layout.addView(header);
content = new EditText(this);
content.setPadding(10, 10, 10, 10);
int inputType = TYPE_CLASS_TEXT | TYPE_TEXT_FLAG_CAP_SENTENCES;
int inputType = TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE
| TYPE_TEXT_FLAG_CAP_SENTENCES;
content.setInputType(inputType);
if(state != null && bundleEncrypter.decrypt(state)) {
Parcelable p = state.getParcelable("net.sf.briar.CONTENT");

View File

@@ -83,7 +83,7 @@ SelectContactsDialog.Listener {
TextView chooseName = new TextView(this);
chooseName.setGravity(CENTER);
chooseName.setTextSize(18);
chooseName.setPadding(10, 10, 10, 10);
chooseName.setPadding(10, 10, 10, 0);
chooseName.setText(R.string.choose_group_name);
layout.addView(chooseName);
@@ -95,7 +95,6 @@ SelectContactsDialog.Listener {
}
};
nameEntry.setMaxLines(1);
nameEntry.setPadding(10, 0, 10, 10);
nameEntry.setInputType(TYPE_CLASS_TEXT | TYPE_TEXT_FLAG_CAP_SENTENCES);
nameEntry.setOnEditorActionListener(this);
layout.addView(nameEntry);

View File

@@ -43,6 +43,7 @@ import net.sf.briar.api.messaging.MessageId;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;
import android.text.InputType;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
@@ -141,8 +142,8 @@ implements OnItemSelectedListener, OnClickListener {
layout.addView(header);
content = new EditText(this);
content.setPadding(10, 10, 10, 10);
int inputType = TYPE_CLASS_TEXT | TYPE_TEXT_FLAG_CAP_SENTENCES;
int inputType = TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE
| TYPE_TEXT_FLAG_CAP_SENTENCES;
content.setInputType(inputType);
if(state != null && bundleEncrypter.decrypt(state)) {
Parcelable p = state.getParcelable("net.sf.briar.CONTENT");

View File

@@ -76,7 +76,7 @@ implements OnEditorActionListener, OnClickListener {
TextView chooseNickname = new TextView(this);
chooseNickname.setGravity(CENTER);
chooseNickname.setTextSize(18);
chooseNickname.setPadding(10, 10, 10, 10);
chooseNickname.setPadding(10, 10, 10, 0);
chooseNickname.setText(R.string.choose_nickname);
layout.addView(chooseNickname);
@@ -89,7 +89,6 @@ implements OnEditorActionListener, OnClickListener {
}
};
nicknameEntry.setMaxLines(1);
nicknameEntry.setPadding(10, 0, 10, 10);
int inputType = TYPE_CLASS_TEXT | TYPE_TEXT_FLAG_CAP_WORDS;
nicknameEntry.setInputType(inputType);
nicknameEntry.setOnEditorActionListener(this);

View File

@@ -38,7 +38,7 @@ implements OnEditorActionListener, OnClickListener {
TextView enterCode = new TextView(ctx);
enterCode.setGravity(CENTER_HORIZONTAL);
enterCode.setTextSize(14);
enterCode.setPadding(10, 10, 10, 10);
enterCode.setPadding(10, 10, 10, 0);
enterCode.setText(prompt);
addView(enterCode);
@@ -55,7 +55,6 @@ implements OnEditorActionListener, OnClickListener {
}
};
codeEntry.setTextSize(26);
codeEntry.setPadding(10, 0, 10, 10);
codeEntry.setOnEditorActionListener(this);
codeEntry.setMinEms(5);
codeEntry.setMaxEms(5);

View File

@@ -39,6 +39,7 @@ import net.sf.briar.api.messaging.MessageId;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;
import android.text.InputType;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
@@ -129,8 +130,8 @@ implements OnItemSelectedListener, OnClickListener {
layout.addView(header);
content = new EditText(this);
content.setPadding(10, 10, 10, 10);
int inputType = TYPE_CLASS_TEXT | TYPE_TEXT_FLAG_CAP_SENTENCES;
int inputType = TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE
| TYPE_TEXT_FLAG_CAP_SENTENCES;
content.setInputType(inputType);
if(state != null && bundleEncrypter.decrypt(state)) {
Parcelable p = state.getParcelable("net.sf.briar.CONTENT");