--- a/res/layout/create_account.xml Mon Jun 01 20:25:59 2009 +0200
+++ b/res/layout/create_account.xml Mon Jun 01 20:49:45 2009 +0200
@@ -15,7 +15,8 @@
style="@style/Label" />
<EditText android:id="@+id/create_account_username"
android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
+ android:layout_height="wrap_content"
+ android:singleLine="true" />
<TextView android:id="@+id/create_account_label_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -24,7 +25,8 @@
<EditText android:id="@+id/create_account_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:password="true" />
+ android:password="true"
+ android:singleLine="true" />
<TextView android:id="@+id/create_account_label_confirm_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -33,7 +35,8 @@
<EditText android:id="@+id/create_account_confirm_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:password="true" />
+ android:password="true"
+ android:singleLine="true" />
<View
android:layout_height="21dp"
android:layout_width="fill_parent" />
--- a/res/layout/edit_settings.xml Mon Jun 01 20:25:59 2009 +0200
+++ b/res/layout/edit_settings.xml Mon Jun 01 20:49:45 2009 +0200
@@ -33,7 +33,8 @@
<EditText android:id="@+id/settings_account_username"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_below="@id/settings_account_label_username" />
+ android:layout_below="@id/settings_account_label_username"
+ android:singleLine="true" />
<TextView android:id="@+id/settings_account_label_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -44,7 +45,8 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/settings_account_label_password"
- android:password="true" />
+ android:password="true"
+ android:singleLine="true" />
<Button android:id="@+id/settings_account_button_save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -88,14 +90,17 @@
<EditText android:id="@+id/settings_xmpp_server"
android:layout_column="1"
android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
+ android:layout_height="wrap_content"
+ android:maxWidth="223dp"
+ android:singleLine="true" />
<EditText android:id="@+id/settings_xmpp_port"
android:layout_column="2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="77dp"
android:numeric="integer"
- android:maxLength="5" />
+ android:maxLength="5"
+ android:singleLine="true" />
</TableRow>
</TableLayout>
<CheckBox android:id="@+id/settings_xmpp_use_tls"
@@ -160,14 +165,17 @@
<EditText android:id="@+id/settings_proxy_server"
android:layout_column="1"
android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
+ android:layout_height="wrap_content"
+ android:maxWidth="223dp"
+ android:singleLine="true" />
<EditText android:id="@+id/settings_proxy_port"
android:layout_column="2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="77dp"
android:numeric="integer"
- android:maxLength="5" />
+ android:maxLength="5"
+ android:singleLine="true" />
</TableRow>
</TableLayout>
<TextView android:id="@+id/settings_proxy_label_username"
@@ -177,7 +185,8 @@
style="@style/Label" />
<EditText android:id="@+id/settings_proxy_username"
android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
+ android:layout_height="wrap_content"
+ android:singleLine="true" />
<TextView android:id="@+id/settings_proxy_label_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -186,7 +195,8 @@
<EditText android:id="@+id/settings_proxy_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:password="true" />
+ android:password="true"
+ android:singleLine="true" />
</LinearLayout>
<Button android:id="@+id/settings_proxy_button_save"
android:layout_width="wrap_content"
--- a/src/com/beem/project/beem/ui/EditSettings.java Mon Jun 01 20:25:59 2009 +0200
+++ b/src/com/beem/project/beem/ui/EditSettings.java Mon Jun 01 20:49:45 2009 +0200
@@ -1,7 +1,6 @@
package com.beem.project.beem.ui;
import java.util.ArrayList;
-
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
@@ -238,16 +237,26 @@
}
/**
+ * Initialize Account tab fields
+ */
+ private void initAccountFields() {
+ accUsernameField = (EditText) findViewById(R.id.settings_account_username);
+ accPasswordField = (EditText) findViewById(R.id.settings_account_password);
+ }
+
+ /**
* Initialize all of the components displayed in tabs (EditText fields, CheckBoxes, Spinners...)
*/
private void initFields() {
- accUsernameField = (EditText) findViewById(R.id.settings_account_username);
- accPasswordField = (EditText) findViewById(R.id.settings_account_password);
+ initAccountFields();
+ initXMPPFields();
+ initProxyFields();
+ }
- xmppServerField = (EditText) findViewById(R.id.settings_xmpp_server);
- xmppPortField = (EditText) findViewById(R.id.settings_xmpp_port);
- xmppUseTLSCheckBox = (CheckBox) findViewById(R.id.settings_xmpp_use_tls);
-
+ /**
+ * Initialize Proxy tab fields
+ */
+ private void initProxyFields() {
proxyUseCheckBox = (CheckBox) findViewById(R.id.settings_proxy_use);
proxyTypeSpinner = (Spinner) findViewById(R.id.settings_proxy_type);
proxyServerField = (EditText) findViewById(R.id.settings_proxy_server);
@@ -295,6 +304,7 @@
for (int i = 0; i < views.size(); i++) {
saveButton = (Button) findViewById(views.get(i));
+ saveButton.setFocusable(true);
saveButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
@@ -317,6 +327,15 @@
}
/**
+ * Initialize XMPP tab fields
+ */
+ private void initXMPPFields() {
+ xmppServerField = (EditText) findViewById(R.id.settings_xmpp_server);
+ xmppPortField = (EditText) findViewById(R.id.settings_xmpp_port);
+ xmppUseTLSCheckBox = (CheckBox) findViewById(R.id.settings_xmpp_use_tls);
+ }
+
+ /**
* {@inheritDoc}
*/
@Override