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

Commit 547f03bb authored by Danesh Mondegarian's avatar Danesh Mondegarian Committed by Steve Kondik
Browse files

Dialer : Cleanup / landscape consistency

- Update resource ids after 4.0.4 merge
- Move additional_buttons into main layout to stay uniform with portrait
- Remove bottom padding in landscape views, since actionbar contains overflow
- Remove search button from landscape dialer and move it to actionbar
- Cleanup unused resources

Patchset 2 : Fix fakeMenu button not showing on phones w/ physical menu button

Change-Id: I7f5232bdb029d5a2498f80493d479113ef66a82b
parent c753ace0
Loading
Loading
Loading
Loading
+56 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->

<!-- Layout parameters are set programmatically. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:divider="?android:attr/dividerHorizontal"
    android:showDividers="end">

    <FrameLayout
        android:id="@+id/voicemail_status"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentBottom="true"
        android:visibility="gone">
        <include layout="@layout/call_log_voicemail_status"
    />
    </FrameLayout>
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
    >
        <ListView android:id="@android:id/list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fadingEdge="none"
            android:scrollbarStyle="outsideOverlay"
            android:divider="@null"
        />
        <TextView android:id="@android:id/empty"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="@string/recentCalls_empty"
            android:gravity="center"
            android:layout_marginTop="@dimen/empty_message_top_margin"
            android:textColor="?android:attr/textColorSecondary"
            android:textAppearance="?android:attr/textAppearanceLarge"
        />
    </FrameLayout>
</LinearLayout>
+0 −73
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.3"
    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>
+45 −4
Original line number Diff line number Diff line
@@ -84,9 +84,50 @@
            android:layout_height="match_parent" />
    </ViewSwitcher>

        <!-- Horizontal row of buttons (Voicemail + DialButton + Delete.) -->
        <include
            layout="@layout/dialpad_additional_buttons" />
    <LinearLayout
            android:id="@+id/dialButtonContainer"
            android:layout_width="match_parent"
            android:layout_height="0px"
            android:layout_weight="0.3"
            android:orientation="horizontal" >

            <!--
             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_height="match_parent"
                android:layout_gravity="center_vertical"
                android:layout_weight="0.40"
                android:background="@drawable/btn_call"
                android:contentDescription="@string/description_dial_button"
                android:src="@drawable/ic_dial_action_call"
                android:state_enabled="false" />

            <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_height="match_parent"
                android:layout_gravity="center_vertical"
                android:layout_weight="0.30"
                android:background="?android:attr/selectableItemBackground"
                android:contentDescription="@string/description_delete_button"
                android:src="@drawable/ic_dial_action_delete"
                android:state_enabled="false" />
    </LinearLayout>

        <!-- "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. -->
+46 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 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.
-->

<!-- Use LinearLayout + FrameLayout, just to rely on android:divider and android:showDividers -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:divider="?android:attr/dividerHorizontal"
    android:showDividers="end">
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <ListView
            android:id="@+id/contact_tile_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingTop="@dimen/contact_tile_list_padding_top"
            android:clipToPadding="false"
            android:fadingEdge="none"
            android:divider="@null" />

        <TextView
            android:id="@+id/contact_tile_list_empty"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center_horizontal"
            android:layout_marginTop="@dimen/empty_message_top_margin"
            android:textColor="?android:attr/textColorSecondary"
            android:textAppearance="?android:attr/textAppearanceLarge"/>
    </FrameLayout>
</LinearLayout>
+0 −75
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.150"
    android:layout_gravity="center_horizontal"
    android:background="@drawable/dialpad_background"
    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>
Loading