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

Commit 13cfa4e0 authored by Danesh M's avatar Danesh M
Browse files

Dialer Landscape Mode

Bring back functionality to the landscape dialer.

Patchset 2 : Fix spacing.

Patchset 3 : Add dialpad settings. (depends on http://review.cyanogenmod.com/#change,10531)

Patchset 4 : Remove uneeded shared preference object.
             Fix preference icon.

Change-Id: Iff644890ac751dc99090a59bb824d319221e86ae
parent 54eccc51
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -347,6 +347,19 @@
            android:label="@string/activity_title_settings"
            android:theme="@style/ContactsPreferencesTheme" />

        <!-- Used to set options -->
        <activity
            android:name=".preference.DialpadPreferenceActivity"
            android:label="@string/dialer_ui_title"
            android:icon="@mipmap/ic_launcher_phone"
            android:theme="@android:style/Theme.Holo.DialogWhenLarge">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <!-- Used to filter contacts list by account -->
        <activity
            android:name=".list.AccountFilterActivity"
+82 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<!-- Dialpad in the Phone app. -->
<TableLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/dialpad"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:layout_weight="1"
    android:layout_marginTop="@dimen/dialpad_vertical_margin"
    android:paddingLeft="5dip">

    <TableRow
         android:layout_height="0px"
         android:layout_weight="1">
        <ImageButton android:id="@+id/one" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_1"
            android:contentDescription="@string/description_image_button_one" />
        <ImageButton android:id="@+id/two" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_2"
            android:contentDescription="@string/description_image_button_two" />
        <ImageButton android:id="@+id/three" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_3"
            android:contentDescription="@string/description_image_button_three" />
    </TableRow>

    <TableRow
         android:layout_height="0px"
         android:layout_weight="1">
        <ImageButton android:id="@+id/four" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_4"
            android:contentDescription="@string/description_image_button_four" />
        <ImageButton android:id="@+id/five" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_5"
            android:contentDescription="@string/description_image_button_five" />
        <ImageButton android:id="@+id/six" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_6"
            android:contentDescription="@string/description_image_button_six" />
    </TableRow>

    <TableRow
         android:layout_height="0px"
         android:layout_weight="1">
        <ImageButton android:id="@+id/seven" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_7"
            android:contentDescription="@string/description_image_button_seven" />
        <ImageButton android:id="@+id/eight" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_8"
            android:contentDescription="@string/description_image_button_eight" />
        <ImageButton android:id="@+id/nine" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_9"
            android:contentDescription="@string/description_image_button_nine" />
    </TableRow>

    <TableRow
         android:layout_height="0px"
         android:layout_weight="1">
        <ImageButton android:id="@+id/star" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_star"
            android:contentDescription="@string/description_image_button_star" />
        <ImageButton android:id="@+id/zero" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_0"
            android:contentDescription="@string/description_image_button_zero" />
        <ImageButton android:id="@+id/pound" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_pound"
            android:contentDescription="@string/description_image_button_pound" />
    </TableRow>
</TableLayout>
+73 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<!-- Horizontal row of buttons (Voicemail + DialButton + Delete.) -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/dialpadAdditionalButtons"
    android:layout_width="match_parent"
    android:layout_height="0px"
    android:layout_weight="0.5"
    android:orientation="horizontal">

    <!-- Onscreen "All contacts" button.
         TODO: rename this id. -->
    <ImageButton android:id="@+id/searchButton"
        android:layout_width="0px"
        android:layout_weight="0.30"
        android:layout_height="match_parent"
        android:layout_gravity="center_vertical"
        android:state_enabled="false"
        android:background="?android:attr/selectableItemBackground"
        android:contentDescription="@string/description_search_button"
        android:src="@drawable/ic_dial_action_search"/>

    <View
        android:layout_width="1dip"
        android:layout_height="24dip"
        android:layout_gravity="center_vertical"
        android:background="?android:attr/dividerVertical" />

    <!-- Onscreen "Dial" button, diused on all platforms by
         default. Its usage can be disabled using resources (see
         config.xml.) -->
    <ImageButton android:id="@+id/dialButton"
        android:layout_width="0px"
        android:layout_weight="0.40"
        android:layout_height="match_parent"
        android:layout_gravity="center_vertical"
        android:state_enabled="false"
        android:background="@drawable/btn_call"
        android:contentDescription="@string/description_dial_button"
        android:src="@drawable/ic_dial_action_call" />

    <View
        android:layout_width="1dip"
        android:layout_height="24dip"
        android:layout_gravity="center_vertical"
        android:background="?android:attr/dividerVertical" />

    <!-- Onscreen "Backspace/Delete" button -->
    <ImageButton android:id="@+id/deleteButton"
        android:layout_width="0px"
        android:layout_weight="0.30"
        android:layout_height="match_parent"
        android:layout_gravity="center_vertical"
        android:state_enabled="false"
        android:background="?android:attr/selectableItemBackground"
        android:contentDescription="@string/description_delete_button"
        android:src="@drawable/ic_dial_action_delete" />
</LinearLayout>
+37 −37
Original line number Diff line number Diff line
@@ -14,44 +14,44 @@
     limitations under the License.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/top"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/dialpad_background"
    android:orientation="horizontal">
    <!-- Keypad section -->
    <include
        layout="@layout/dialpad" />
    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:orientation="vertical"
>
        android:layout_weight="1">

    <!-- 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"
        <com.android.contacts.dialpad.DigitsEditText
            android:id="@+id/digits"
            android:layout_width="match_parent"
        android:layout_height="@dimen/dialpad_digits_height"
        android:layout_marginBottom="@dimen/dialpad_digits_margin_bottom"
        android:layout_marginTop="1dip"
            android:layout_weight="1"
            android:layout_height="0dp"
            android:layout_alignParentLeft="true"
            android:gravity="center"
        android:maxLines="1"
        android:scrollHorizontally="true"
        android:textSize="@dimen/dialpad_digits_text_size"
        android:freezesText="true"
        android:background="@drawable/btn_dial_textfield"
        android:textColor="@color/dialer_button_text"
        android:hint="@string/dialerKeyboardHintText"
     />
            android:textAppearance="@style/DialtactsDigitsTextAppearance"
            android:textColor="?android:attr/textColorPrimary"
            android:nextFocusRight="@+id/overflow_menu"
            android:background="@android:color/transparent" />

        <!-- Horizontal row of buttons (Voicemail + DialButton + Delete.) -->
    <include layout="@layout/dialpad_additional_buttons" />

    <!-- "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
         (the textfield and button) are hidden. -->
    <ListView android:id="@+id/dialpadChooser"
        <include
            layout="@layout/dialpad_additional_buttons" />
        <!-- "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 (the textfield and button) are hidden. -->
        <ListView
            android:id="@+id/dialpadChooser"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
        android:footerDividersEnabled="true"
    />

            android:footerDividersEnabled="true" />
    </LinearLayout>
</LinearLayout>
+5 −0
Original line number Diff line number Diff line
@@ -372,6 +372,11 @@
         [CHAR LIMIT=NONE] -->
    <string name="dialerIconLabel">Phone</string>

    <!-- Dialer UI Settings -->
    <string name="dialer_ui_title">Dialer settings</string>
    <string name="dialer_ui_orientation_title">Enable sensor orientation</string>
    <string name="dialer_ui_orientation_summary">Rotate dialer based on sensor</string>

    <!-- The description text for the call log tab.

         Note: AccessibilityServices use this attribute to announce what the view represents.
Loading