Dialer: add onscreen "Dial" button.
Add a new "Dial" button, below the keypad (in portrait) or below the
"digits" widget (in landscape). It does the exact same action as tapping
the digits widget, and its enabled/disabled state uses the exact same
logic that turns the digit widget green when it's OK to dial.
This is a partial fix for bug 1825144 (soft SEND/END keys in places other
than in-call),
The button has visibility GONE by default; it's enabled on a per-product
basis using a flag in config.xml. (To enable this on devices that need
it, I'll separately check in resource overlay files in those other
projects)
For now the Dial button is just a regular button, with no special layout
or artwork. (But bug 1993282 is open to cover any future visual design
tweaks we might need.)
diff --git a/res/layout-finger/twelve_key_dialer.xml b/res/layout-finger/twelve_key_dialer.xml
index 071ca57..781f23c 100644
--- a/res/layout-finger/twelve_key_dialer.xml
+++ b/res/layout-finger/twelve_key_dialer.xml
@@ -58,6 +58,21 @@
<!-- Keypad section -->
<include layout="@layout/dialpad" />
+ <!-- Onscreen "Dial" button, used on some platforms -->
+ <Button android:id="@+id/dialButton"
+ android:text="@string/dial_button_label"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:layout_width="wrap_content"
+ android:layout_height="60dip"
+ android:gravity="center"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="20dip"
+ android:paddingLeft="100dip"
+ android:paddingRight="100dip"
+ android:enabled="false"
+ android:visibility="gone"
+ />
+
<!-- "Dialpad chooser" UI, shown only when the user brings up the
Dialer while a call is already in progress.
When this UI is visible, the other Dialer elements
diff --git a/res/layout-land-finger/twelve_key_dialer.xml b/res/layout-land-finger/twelve_key_dialer.xml
index 2b436b8..a1849e1 100644
--- a/res/layout-land-finger/twelve_key_dialer.xml
+++ b/res/layout-land-finger/twelve_key_dialer.xml
@@ -59,6 +59,21 @@
</LinearLayout>
+ <!-- Onscreen "Dial" button, used on some platforms -->
+ <Button android:id="@+id/dialButton"
+ android:text="@string/dial_button_label"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:layout_width="wrap_content"
+ android:layout_height="60dip"
+ android:gravity="center"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="20dip"
+ android:paddingLeft="100dip"
+ android:paddingRight="100dip"
+ android:enabled="false"
+ android:visibility="gone"
+ />
+
<!-- "Dialpad chooser" UI, shown only when the user brings up the
Dialer while a call is already in progress.
When this UI is visible, the other Dialer elements
diff --git a/res/values/config.xml b/res/values/config.xml
index 7af1d54..32664ec 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -71,4 +71,11 @@
exist in a target directory, 00003.vcf becomes a next file name candidate.
Without this configuration, 00002.vcf becomes the candidate.-->
<string name="config_export_extensions_to_consider"></string>
+
+ <!-- If true, show an onscreen "Dial" button in the dialer.
+ (In practice this is used only on platforms with no hard SEND/END
+ keys, but for maximum flexibility it's controlled by a flag here
+ (which can be overridden on a per-product basis.)) -->
+ <bool name="config_show_onscreen_dial_button">false</bool>
+
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5ad60b3..cca8b80 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -740,4 +740,8 @@
<!-- Menu items for dialpad options as part of Pause and Wait ftr -->
<string name="add_2sec_pause">Add 2-sec Pause</string>
<string name="add_wait">Add Wait</string>
+
+ <!-- Label for onscreen "Dial" button -->
+ <string name="dial_button_label">Dial</string>
+
</resources>