Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84c99a4e authored by Andrew Lee's avatar Andrew Lee
Browse files

Adjust layout for dialpad to support both Dialer and InCallUI.

This mostly was done by changing the key rows so that their height
is determined by layout weights instead of explictly defined. The
size of some objects were adjusted as well, to better fit the grids
for the newer design.

Changed text dimensions to be dp instead of sp, so they don't scale.

Bug: 14471388
Change-Id: Ie29376bd485f12970f117d2bc97e47733fd92717
parent 7adb8833
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -19,12 +19,13 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/dialpad"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:clipChildren="false">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="horizontal">
        <Space style="@style/DialpadSpaceStyle" />
        <com.android.contacts.common.dialpad.DialpadKeyButton
@@ -59,7 +60,8 @@

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="horizontal">
        <Space style="@style/DialpadSpaceStyle" />
        <include layout="@layout/dialpad_key"
@@ -76,7 +78,8 @@

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="horizontal">
        <Space style="@style/DialpadSpaceStyle" />
        <include layout="@layout/dialpad_key"
@@ -93,7 +96,8 @@

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="horizontal">
        <Space style="@style/DialpadSpaceStyle" />
        <com.android.contacts.common.dialpad.DialpadKeyButton
+1 −18
Original line number Diff line number Diff line
@@ -16,22 +16,13 @@
<view class="com.android.contacts.common.dialpad.DialpadView"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/dialpad_view"
    android:layout_height="wrap_content"
    android:layout_height="match_parent"
    android:layout_width="match_parent"
    android:layout_gravity="bottom"
    android:orientation="vertical"
    android:layoutDirection="ltr"
    android:background="@color/background_dialpad">

    <Space
        android:layout_width="match_parent"
        android:layout_height="2dp"
        android:background="@color/dialpad_separator_line_color" />

    <Space
        android:layout_width="match_parent"
        android:layout_height="10dp" />

    <!-- Text field and possibly soft menu button above the keypad where
     the digits are displayed. -->
    <LinearLayout
@@ -72,18 +63,10 @@
            android:src="@drawable/ic_dial_action_delete" />
    </LinearLayout>

    <Space
        android:layout_width="match_parent"
        android:layout_height="8dp" />

    <include layout="@layout/dialpad" />

    <Space
        android:layout_width="match_parent"
        android:layout_height="8dp" />

    <Space
        android:layout_width="match_parent"
        android:layout_height="2dp"
        android:background="@color/dialpad_separator_line_color" />
</view>
+7 −7
Original line number Diff line number Diff line
@@ -103,17 +103,17 @@
    <dimen name="tab_selected_underline_height">3dp</dimen>

    <!-- Text dimensions for dialpad keys -->
    <dimen name="dialpad_key_numbers_size">34sp</dimen>
    <dimen name="dialpad_key_letters_size">8sp</dimen>
    <dimen name="dialpad_key_star_pound_size">23sp</dimen>
    <dimen name="dialpad_key_height">64sp</dimen>
    <dimen name="dialpad_key_numbers_size">34dp</dimen>
    <dimen name="dialpad_key_letters_size">8dp</dimen>
    <dimen name="dialpad_key_star_pound_size">23dp</dimen>
    <dimen name="dialpad_key_height">64dp</dimen>
    <dimen name="dialpad_subtext_height">10dp</dimen>
    <!-- The bottom row of the dialpad is slightly taller to account for the dial button -->
    <dimen name="dialpad_bottom_key_height">70dp</dimen>
    <dimen name="dialpad_bottom_key_height">72dp</dimen>
    <dimen name="dialpad_key_plus_size">18sp</dimen>
    <dimen name="dialpad_horizontal_padding">5dp</dimen>
    <dimen name="dialpad_digits_text_size">33sp</dimen>
    <dimen name="dialpad_digits_height">55dp</dimen>
    <dimen name="dialpad_digits_text_size">33dp</dimen>
    <dimen name="dialpad_digits_height">64dp</dimen>
    <dimen name="dialpad_digits_padding">16dp</dimen>
    <dimen name="dialpad_digits_margin_bottom">0px</dimen>
    <dimen name="dialpad_center_margin">3dp</dimen>
+2 −2
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ background and text color. See also android:style/Widget.Holo.TextView.ListSepar

    <style name="DialpadSpaceStyle">
        <item name="android:layout_width">0dp</item>
        <item name="android:layout_height">@dimen/dialpad_key_height</item>
        <item name="android:layout_height">match_parent</item>
        <item name="android:layout_weight">3</item>
    </style>

@@ -126,7 +126,7 @@ background and text color. See also android:style/Widget.Holo.TextView.ListSepar
        <item name="android:soundEffectsEnabled">false</item>
        <item name="android:clickable">true</item>
        <item name="android:layout_width">0dp</item>
        <item name="android:layout_height">@dimen/dialpad_key_height</item>
        <item name="android:layout_height">match_parent</item>
        <item name="android:layout_weight">13</item>
        <item name="android:background">@drawable/dialpad_key_colors</item>
        <item name="android:focusable">true</item>