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

Commit 6b049128 authored by Yorke Lee's avatar Yorke Lee
Browse files

Adding new copies of classes for new Dialer UI

No code has been modified at all in this CL. All classes
were copied from existing classes and renamed to add the New prefix.

Change-Id: Idbb522c9dd1ef5db8e3dffcb73155ca603f861b2
parent d3bb6416
Loading
Loading
Loading
Loading
+81 −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"
    style="@style/FragmentActionBarPadding"
    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:visibility="gone">
        <include layout="@layout/call_log_voicemail_status"
    />
    </FrameLayout>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <TextView
            android:id="@+id/filter_status"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/ContactListSeparatorTextViewStyle"
            android:layout_marginStart="@dimen/call_log_outer_margin"
            android:layout_marginEnd="@dimen/call_log_outer_margin"
            android:paddingTop="@dimen/call_log_inner_margin"
            android:paddingBottom="@dimen/call_log_inner_margin"
            android:layout_alignParentStart="true"
            android:layout_alignParentBottom="true"
            android:visibility="gone"
            />
        <View
            android:id="@+id/call_log_divider"
            android:layout_width="match_parent"
            android:layout_height="1px"
            android:layout_marginStart="@dimen/call_log_outer_margin"
            android:layout_marginEnd="@dimen/call_log_outer_margin"
            android:layout_gravity="bottom"
            android:background="#55ffffff"
            />
    </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>
+167 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 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.
-->

<view
    xmlns:android="http://schemas.android.com/apk/res/android"
    class="com.android.dialer.calllog.CallLogListItemView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
>
    <!--
        This layout may represent either a call log item or one of the
        headers in the call log.

        The former will make the @id/call_log_item visible and the
        @id/call_log_header gone.

        The latter will make the @id/call_log_header visible and the
        @id/call_log_item gone
    -->

        <LinearLayout
            android:id="@+id/primary_action_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginStart="@dimen/call_log_outer_margin"
            android:layout_marginEnd="@dimen/call_log_outer_margin"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:background="?android:attr/selectableItemBackground"
            android:focusable="true"
            android:nextFocusRight="@+id/secondary_action_icon"
            android:nextFocusLeft="@+id/quick_contact_photo"
        >
            <QuickContactBadge
                android:id="@+id/quick_contact_photo"
                android:layout_width="@dimen/call_log_list_contact_photo_size"
                android:layout_height="@dimen/call_log_list_contact_photo_size"
                android:nextFocusRight="@id/primary_action_view"
                android:layout_alignParentStart="true"
                android:layout_centerVertical="true"
                android:focusable="true"
            />
            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:paddingTop="@dimen/call_log_inner_margin"
                android:paddingBottom="@dimen/call_log_inner_margin"
                android:orientation="vertical"
                android:gravity="center_vertical"
                android:layout_marginStart="@dimen/call_log_inner_margin"
            >
                <TextView
                    android:id="@+id/name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="@dimen/call_log_icon_margin"
                    android:textColor="?attr/call_log_primary_text_color"
                    android:textSize="18sp"
                    android:singleLine="true"
                />
                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                >
                    <TextView
                        android:id="@+id/number"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginEnd="@dimen/call_log_icon_margin"
                        android:textColor="?attr/call_log_secondary_text_color"
                        android:textSize="14sp"
                        android:singleLine="true"
                        android:ellipsize="marquee"
                        />
                    <TextView
                        android:id="@+id/label"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginEnd="@dimen/call_log_icon_margin"
                        android:textColor="?attr/call_log_secondary_text_color"
                        android:textStyle="bold"
                        android:textSize="14sp"
                        android:singleLine="true"
                        android:ellipsize="marquee"
                        />
                    </LinearLayout>
                <LinearLayout
                    android:id="@+id/call_type"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                >
                    <view
                        class="com.android.dialer.calllog.CallTypeIconsView"
                        android:id="@+id/call_type_icons"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginEnd="@dimen/call_log_icon_margin"
                        android:layout_gravity="center_vertical"
                    />
                    <TextView
                        android:id="@+id/call_count_and_date"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginEnd="@dimen/call_log_icon_margin"
                        android:layout_gravity="center_vertical"
                        android:textColor="?attr/call_log_secondary_text_color"
                        android:textSize="14sp"
                        android:singleLine="true"
                    />
                </LinearLayout>
            </LinearLayout>
            <View
                android:id="@+id/divider"
                android:layout_width="1px"
                android:layout_height="@dimen/call_log_call_action_size"
                android:background="@drawable/ic_divider_dashed_holo_dark"
                android:layout_gravity="center_vertical"
            />
            <ImageButton
                android:id="@+id/secondary_action_icon"
                android:layout_width="@dimen/call_log_call_action_width"
                android:layout_height="match_parent"
                android:paddingStart="@dimen/call_log_inner_margin"
                android:paddingTop="@dimen/call_log_inner_margin"
                android:paddingBottom="@dimen/call_log_inner_margin"
                android:paddingEnd="@dimen/call_log_inner_margin"
                android:scaleType="center"
                android:background="?android:attr/selectableItemBackground"
                android:nextFocusLeft="@id/primary_action_view"
            />
        </LinearLayout>

    <TextView
        android:id="@+id/call_log_header"
        style="@style/ContactListSeparatorTextViewStyle"
        android:layout_marginStart="@dimen/call_log_outer_margin"
        android:layout_marginEnd="@dimen/call_log_outer_margin"
        android:paddingTop="@dimen/call_log_inner_margin"
        android:paddingBottom="@dimen/call_log_inner_margin" />

    <View
        android:id="@+id/call_log_divider"
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:layout_marginStart="@dimen/call_log_outer_margin"
        android:layout_marginEnd="@dimen/call_log_outer_margin"
        android:background="#55ffffff"
    />
</view>
+99 −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="match_parent"
    android:layout_height="0px"
    android:layout_weight="@integer/dialpad_layout_weight_dialpad"
    android:layout_gravity="center_horizontal"
    android:layout_marginTop="@dimen/dialpad_vertical_margin"
    android:paddingStart="5dip"
    android:paddingEnd="5dip"
    android:paddingBottom="10dip"
    android:background="@drawable/dialpad_background"
    android:layoutDirection="ltr" >

    <TableRow
         android:layout_height="0px"
         android:layout_weight="1">
        <com.android.dialer.dialpad.DialpadImageButton
            android:id="@+id/one" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_1_wht"
            android:contentDescription="@string/description_image_button_one" />
        <com.android.dialer.dialpad.DialpadImageButton
            android:id="@+id/two" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_2_wht"
            android:contentDescription="@string/description_image_button_two" />
        <com.android.dialer.dialpad.DialpadImageButton
            android:id="@+id/three" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_3_wht"
            android:contentDescription="@string/description_image_button_three" />
    </TableRow>

    <TableRow
         android:layout_height="0px"
         android:layout_weight="1">
        <com.android.dialer.dialpad.DialpadImageButton
            android:id="@+id/four" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_4_wht"
            android:contentDescription="@string/description_image_button_four" />
        <com.android.dialer.dialpad.DialpadImageButton
            android:id="@+id/five" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_5_wht"
            android:contentDescription="@string/description_image_button_five" />
        <com.android.dialer.dialpad.DialpadImageButton
            android:id="@+id/six" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_6_wht"
            android:contentDescription="@string/description_image_button_six" />
    </TableRow>

    <TableRow
         android:layout_height="0px"
         android:layout_weight="1">
        <com.android.dialer.dialpad.DialpadImageButton
            android:id="@+id/seven" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_7_wht"
            android:contentDescription="@string/description_image_button_seven" />
        <com.android.dialer.dialpad.DialpadImageButton
            android:id="@+id/eight" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_8_wht"
            android:contentDescription="@string/description_image_button_eight" />
        <com.android.dialer.dialpad.DialpadImageButton
            android:id="@+id/nine" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_9_wht"
            android:contentDescription="@string/description_image_button_nine" />
    </TableRow>

    <TableRow
         android:layout_height="0px"
         android:layout_weight="1">
        <com.android.dialer.dialpad.DialpadImageButton
            android:id="@+id/star" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_star_wht"
            android:contentDescription="@string/description_image_button_star" />
        <com.android.dialer.dialpad.DialpadImageButton
            android:id="@+id/zero" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_0_wht"
            android:contentDescription="@string/description_image_button_zero" />
        <com.android.dialer.dialpad.DialpadImageButton
            android:id="@+id/pound" style="@style/DialtactsDialpadButtonStyle"
            android:src="@drawable/dial_num_pound_wht"
            android:contentDescription="@string/description_image_button_pound" />
    </TableRow>
</TableLayout>
+120 −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.
-->

<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:orientation="vertical"
    android:paddingStart="@dimen/dialpad_horizontal_margin"
    android:paddingEnd="@dimen/dialpad_horizontal_margin"
    android:layoutDirection="ltr" >

    <!-- Text field and possibly soft menu button above the keypad where
         the digits are displayed. -->
    <LinearLayout
        android:id="@+id/digits_container"
        android:layout_width="match_parent"
        android:layout_height="0px"
        android:layout_weight="@integer/dialpad_layout_weight_digits"
        android:layout_marginTop="@dimen/dialpad_vertical_margin"
        android:gravity="center"
        android:background="@drawable/dialpad_background" >

        <com.android.dialer.dialpad.DigitsEditText
            android:id="@+id/digits"
            android:layout_width="0dip"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:gravity="center"
            android:textAppearance="@style/DialtactsDigitsTextAppearance"
            android:textColor="?android:attr/textColorPrimary"
            android:nextFocusRight="@+id/overflow_menu"
            android:background="@android:color/transparent" />

        <ImageButton
            android:id="@+id/deleteButton"
            android:layout_width="56dip"
            android:layout_height="match_parent"
            android:layout_gravity="center_vertical"
            android:gravity="center"
            android:state_enabled="false"
            android:background="?android:attr/selectableItemBackground"
            android:contentDescription="@string/description_delete_button"
            android:src="@drawable/ic_dial_action_delete" />
    </LinearLayout>

    <!-- Smart dial suggestion section.
         sp is used here for this layout instead of dp in order for it to resize as
         appropriate when the font size increases. This is a one-time exception that is
         ok in this case because there is space for the suggestion strip to expand. -->
    <RelativeLayout
        android:id="@+id/dialpad_smartdial_container"
        android:layout_width="match_parent"
        android:layout_height="50sp"
        android:layout_marginTop="@dimen/dialpad_vertical_margin">
        <View
            android:id="@+id/dialpad_smartdial_list_background"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/dialpad_background">
        </View>
        <LinearLayout
            android:id="@+id/dialpad_smartdial_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="horizontal"
            android:gravity="center">
        </LinearLayout>
    </RelativeLayout>

    <!-- Keypad section -->
    <include layout="@layout/dialpad" />

    <View style="@style/DialpadHorizontalSeparator"/>

    <!-- left and right paddings will be modified by the code. See DialpadFragment. -->
    <FrameLayout
        android:id="@+id/dialButtonContainer"
        android:layout_width="match_parent"
        android:layout_height="0px"
        android:layout_weight="@integer/dialpad_layout_weight_additional_buttons"
        android:layout_gravity="center_horizontal"
        android:background="@drawable/dialpad_background">

        <ImageButton
            android:id="@+id/dialButton"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:state_enabled="false"
            android:background="@drawable/btn_call"
            android:contentDescription="@string/description_dial_button"
            android:src="@drawable/ic_dial_action_call" />

    </FrameLayout>

    <!-- "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/button and the dialpad) are hidden. -->
    <ListView android:id="@+id/dialpadChooser"
        android:layout_width="match_parent"
        android:layout_height="1dip"
        android:layout_weight="1"
    />

</LinearLayout>
+47 −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.
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginTop="?android:attr/actionBarSize"
    android:id="@+id/dialtacts_frame"
    >
    <android.support.v4.view.ViewPager
        android:id="@+id/pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <ImageButton
         android:id="@+id/searchButton"
         android:layout_width="wrap_content"
         android:layout_height="?android:attr/actionBarSize"
         android:layout_gravity="bottom|start"
         android:state_enabled="false"
         android:background="?android:attr/selectableItemBackground"
         android:contentDescription="@string/description_search_button"
         android:src="@drawable/ic_dial_action_search"/>

    <ImageButton
         android:id="@+id/overflow_menu"
         android:layout_width="wrap_content"
         android:layout_height="?android:attr/actionBarSize"
         android:layout_gravity="bottom|end"
         android:src="@drawable/ic_menu_overflow"
         android:contentDescription="@string/action_menu_overflow_description"
         android:nextFocusLeft="@id/digits"
         android:background="?android:attr/selectableItemBackground"/>
</FrameLayout>
Loading