Merge change I1cde5dd0 into eclair
* changes:
In landscape mode, set the type of digit area to PHONE[do not merge].
diff --git a/res/layout-finger/twelve_key_dialer.xml b/res/layout-finger/twelve_key_dialer.xml
index 3550444..5601574 100644
--- a/res/layout-finger/twelve_key_dialer.xml
+++ b/res/layout-finger/twelve_key_dialer.xml
@@ -21,7 +21,10 @@
android:orientation="vertical"
>
- <!-- Text field above the keypad where the digits are displayed -->
+ <!-- Text field above the keypad where the digits are displayed.
+ It's type is set to NULL (to disable the IME keyboard) in the
+ java code.
+ -->
<!-- TODO: Use a textAppearance to control the display of the number -->
<EditText android:id="@+id/digits"
android:layout_width="fill_parent"
diff --git a/res/layout-land-finger/twelve_key_dialer.xml b/res/layout-land-finger/twelve_key_dialer.xml
index 8c66ff3..92906ba 100644
--- a/res/layout-land-finger/twelve_key_dialer.xml
+++ b/res/layout-land-finger/twelve_key_dialer.xml
@@ -21,7 +21,10 @@
android:orientation="vertical"
>
- <!-- Text field above the keypad where the digits are displayed -->
+ <!-- Text field above the keypad where the digits are displayed.
+ It's type is set to PHONE (to put the keyboard in the right
+ config) in the java code.
+ -->
<!-- TODO: Use a textAppearance to control the display of the number -->
<EditText android:id="@+id/digits"
android:layout_width="fill_parent"
diff --git a/res/layout-long-finger/twelve_key_dialer.xml b/res/layout-long-finger/twelve_key_dialer.xml
index d1d0f37..1ccb70c 100644
--- a/res/layout-long-finger/twelve_key_dialer.xml
+++ b/res/layout-long-finger/twelve_key_dialer.xml
@@ -21,7 +21,10 @@
android:orientation="vertical"
>
- <!-- Text field above the keypad where the digits are displayed -->
+ <!-- Text field above the keypad where the digits are displayed.
+ It's type is set to NULL (to disable the IME keyboard) in the
+ java code.
+ -->
<!-- TODO: Use a textAppearance to control the display of the number -->
<EditText android:id="@+id/digits"
android:layout_width="fill_parent"
diff --git a/res/layout-long-land-finger/twelve_key_dialer.xml b/res/layout-long-land-finger/twelve_key_dialer.xml
index 618792a..18c9a0f 100644
--- a/res/layout-long-land-finger/twelve_key_dialer.xml
+++ b/res/layout-long-land-finger/twelve_key_dialer.xml
@@ -21,7 +21,10 @@
android:orientation="vertical"
>
- <!-- Text field above the keypad where the digits are displayed -->
+ <!-- Text field above the keypad where the digits are displayed.
+ It's type is set to PHONE (to put the keyboard in the right
+ config) in the java code.
+ -->
<!-- TODO: Use a textAppearance to control the display of the number -->
<EditText android:id="@+id/digits"
android:layout_width="fill_parent"
diff --git a/src/com/android/contacts/TwelveKeyDialer.java b/src/com/android/contacts/TwelveKeyDialer.java
index 176997a..0eb9c94 100644
--- a/src/com/android/contacts/TwelveKeyDialer.java
+++ b/src/com/android/contacts/TwelveKeyDialer.java
@@ -185,7 +185,6 @@
mDigits.setKeyListener(DialerKeyListener.getInstance());
mDigits.setOnClickListener(this);
mDigits.setOnKeyListener(this);
- mDigits.setInputType(android.text.InputType.TYPE_NULL); // Don't show IME when focused.
maybeAddNumberFormatting();
@@ -214,7 +213,16 @@
view.setOnLongClickListener(this);
mDelete = view;
- mDialpad = findViewById(R.id.dialpad); // This is null in landscape mode
+ mDialpad = findViewById(R.id.dialpad); // This is null in landscape mode.
+
+ // In landscape we put the keyboard in phone mode.
+ // In portrait we prevent the soft keyboard to show since the
+ // dialpad acts as one already.
+ if (null == mDialpad) {
+ mDigits.setInputType(android.text.InputType.TYPE_CLASS_PHONE);
+ } else {
+ mDigits.setInputType(android.text.InputType.TYPE_NULL);
+ }
// Set up the "dialpad chooser" UI; see showDialpadChooser().
mDialpadChooser = (ListView) findViewById(R.id.dialpadChooser);