summaryrefslogtreecommitdiffstats
path: root/apps/CustomLocale
diff options
context:
space:
mode:
authorRaphael <raphael@google.com>2009-10-01 13:27:23 -0700
committerRaphael <raphael@google.com>2009-10-01 13:28:21 -0700
commit0bd70bcf5bbc32cb5a051edbd652b57319c8d718 (patch)
tree8415fa9cb539d142f17377f0949ddac35f788ccb /apps/CustomLocale
parent1233e408f77ad8752afa1387a94c8e2b378b6629 (diff)
downloadandroid_development-0bd70bcf5bbc32cb5a051edbd652b57319c8d718.tar.gz
android_development-0bd70bcf5bbc32cb5a051edbd652b57319c8d718.tar.bz2
android_development-0bd70bcf5bbc32cb5a051edbd652b57319c8d718.zip
Fix CustomLocale to work with soft keyboard.
SDK BUG 2154263 Change-Id: I8a575e49089ef2e6829e10749d796f6179330928
Diffstat (limited to 'apps/CustomLocale')
-rw-r--r--apps/CustomLocale/res/layout/new_locale.xml2
-rw-r--r--apps/CustomLocale/src/com/android/customlocale/NewLocaleDialog.java18
2 files changed, 2 insertions, 18 deletions
diff --git a/apps/CustomLocale/res/layout/new_locale.xml b/apps/CustomLocale/res/layout/new_locale.xml
index d0d9d6c38..fafb16e92 100644
--- a/apps/CustomLocale/res/layout/new_locale.xml
+++ b/apps/CustomLocale/res/layout/new_locale.xml
@@ -21,7 +21,7 @@
android:paddingLeft="8dip"
android:paddingRight="8dip">
<TextView
- android:layout_width="wrap_content"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/new_locale_label" />
<EditText
diff --git a/apps/CustomLocale/src/com/android/customlocale/NewLocaleDialog.java b/apps/CustomLocale/src/com/android/customlocale/NewLocaleDialog.java
index 3626f7398..04f72223c 100644
--- a/apps/CustomLocale/src/com/android/customlocale/NewLocaleDialog.java
+++ b/apps/CustomLocale/src/com/android/customlocale/NewLocaleDialog.java
@@ -31,8 +31,7 @@ import android.widget.EditText;
* "en_US") via an intent with a "locale" extra string and a "select" extra
* boolean.
*/
-public class NewLocaleDialog extends Activity
- implements View.OnClickListener, View.OnKeyListener {
+public class NewLocaleDialog extends Activity implements View.OnClickListener {
public static final String INTENT_EXTRA_LOCALE = "locale";
public static final String INTENT_EXTRA_SELECT = "select";
@@ -55,13 +54,9 @@ public class NewLocaleDialog extends Activity
mButtonAdd = (Button) findViewById(R.id.add);
mButtonAdd.setOnClickListener(this);
- mButtonAdd.setEnabled(false);
mButtonAddSelect = (Button) findViewById(R.id.add_and_select);
mButtonAddSelect.setOnClickListener(this);
- mButtonAddSelect.setEnabled(false);
-
- mEditText.setOnKeyListener(this);
}
public void onClick(View v) {
@@ -79,15 +74,4 @@ public class NewLocaleDialog extends Activity
finish();
}
-
- public boolean onKey(View v, int keyCode, KeyEvent event) {
- boolean isEmpty = TextUtils.isEmpty(mEditText.getText());
- if (isEmpty != mWasEmpty) {
- mWasEmpty = isEmpty;
-
- mButtonAdd.setEnabled(!isEmpty);
- mButtonAddSelect.setEnabled(!isEmpty);
- }
- return false;
- }
}