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

Commit f6ccd509 authored by Tingting Wang's avatar Tingting Wang Committed by Android (Google) Code Review
Browse files

Merge "Add suggestion card for quick contact (P2)" into ub-contactsdialer-a-dev

parents 3bb167c1 e3a7c4f3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -54,6 +54,8 @@
            android:visibility="gone"
            cardview:cardCornerRadius="@dimen/expanding_entry_card_card_corner_radius" />

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

    </LinearLayout>

</com.android.contacts.widget.TouchlessScrollView>
 No newline at end of file
+137 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 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 for the suggestion card in QuickContact.
-->
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    style="@style/ExpandingEntryCardStyle"
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:visibility="gone"
    android:id="@+id/suggestion_card_view">

    <LinearLayout
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:orientation="vertical">

        <LinearLayout
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:layout_marginTop="@dimen/quickcontact_suggestion_card_layout_margin"
            android:layout_marginBottom="@dimen/quickcontact_suggestion_card_layout_margin"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/suggestion_icon"
                android:layout_width="@dimen/quickcontact_suggestion_card_icon_height"
                android:layout_height="@dimen/quickcontact_suggestion_card_icon_width"
                android:layout_gravity="center_vertical"
                android:layout_marginStart="@dimen/quickcontact_suggestion_card_image_spacing"
                android:scaleType="fitCenter" />

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:layout_gravity="center_vertical"
                android:layout_weight="1"
                android:layout_toEndOf="@+id/line_vertical_separator"
                android:layout_marginStart="@dimen/expanding_entry_card_item_image_spacing"
                android:layout_marginEnd="@dimen/expanding_entry_card_item_image_spacing">

                <TextView
                    android:id="@+id/suggestion_for_name"
                    android:textSize="@dimen/expanding_entry_card_title_text_size"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textColor="@color/quickcontact_entry_header_text_color"
                    android:singleLine="true"
                    android:ellipsize="end"
                    android:textAlignment="viewStart"/>

                <TextView
                    android:id="@+id/suggestion_number"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textAlignment="viewStart"
                    android:singleLine="true"
                    android:ellipsize="end"
                    android:textColor="@color/quickcontact_entry_sub_header_text_color" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:id="@+id/suggestion_summary"
                    android:textAlignment="viewStart"
                    android:singleLine="true"
                    android:ellipsize="end"
                    android:textColor="@color/quickcontact_entry_sub_header_text_color" />
            </LinearLayout>

            <View
                android:id="@+id/line_vertical_separator"
                android:layout_width="@dimen/divider_line_height"
                android:layout_height="match_parent"
                android:layout_toEndOf="@+id/expand_suggestion_button"
                android:background="@color/divider_line_color_light"/>

            <ImageView
                android:id="@+id/expand_suggestion_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical|end"
                android:layout_alignParentEnd="true"
                android:paddingStart="@dimen/editor_round_button_padding_left"
                android:paddingEnd="@dimen/editor_round_button_padding_right"
                android:paddingTop="@dimen/editor_round_button_padding_top"
                android:paddingBottom="@dimen/editor_round_button_padding_bottom"/>

        </LinearLayout>

        <View
            android:id="@+id/title_separator"
            android:layout_width="match_parent"
            android:layout_height="@dimen/divider_line_height"
            android:paddingTop="@dimen/editor_round_button_padding_top"
            android:background="@color/divider_line_color_light"/>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/suggestion_list"
            android:animateLayoutChanges="true"
            android:orientation="vertical" />

        <View
            android:id="@+id/title_separator2"
            android:layout_width="match_parent"
            android:layout_height="@dimen/divider_line_height"
            android:background="@color/divider_line_color_light"
            android:visibility="gone"/>

        <Button
            android:id="@+id/merge_button"
            style="?android:attr/buttonBarButtonStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/quickcontact_suggestion_merge_button"
            android:textColor="@color/quickcontact_entry_sub_header_text_color"
            android:paddingStart="@dimen/quickcontact_suggestion_card_image_spacing"/>
    </LinearLayout>
</android.support.v7.widget.CardView>
 No newline at end of file
+72 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 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:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="@dimen/quickcontact_suggestion_card_layout_margin"
    android:layout_marginBottom="@dimen/quickcontact_suggestion_card_layout_margin">

    <ImageView
        android:id="@+id/aggregation_suggestion_photo"
        android:layout_width="@dimen/quickcontact_suggestion_card_icon_height"
        android:layout_height="@dimen/quickcontact_suggestion_card_icon_width"
        android:layout_marginStart="@dimen/quickcontact_suggestion_card_image_spacing"
        android:scaleType="fitCenter"
        android:layout_gravity="center_vertical" />

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/expanding_entry_card_item_image_spacing"
        android:layout_weight="1"
        android:orientation="vertical"
        android:layout_gravity="center_vertical">

        <TextView
            android:id="@+id/aggregation_suggestion_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="@dimen/expanding_entry_card_title_text_size"
            android:textColor="@color/quickcontact_entry_sub_header_text_color"
            android:layout_marginTop="@dimen/quickcontact_suggestion_card_layout_margin"
            android:singleLine="true"
            android:ellipsize="end"
            android:textAppearance="?android:attr/textAppearanceMedium" />

        <TextView
            android:id="@+id/aggregation_suggestion_account_type"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_marginBottom="@dimen/quickcontact_suggestion_card_layout_margin"
            android:singleLine="true"
            android:ellipsize="end"
            android:textColor="@color/quickcontact_entry_sub_header_text_color" />

    </LinearLayout>

    <CheckBox
        android:id="@+id/suggestion_checkbox"
        android:layout_gravity="center_vertical|end"
        android:layout_alignParentEnd="true"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:shadowColor="@color/divider_line_color_light"
        android:layout_marginEnd="@dimen/quickcontact_suggestion_card_checkbox_right_margin"/>

</LinearLayout>
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
@@ -228,6 +228,12 @@
    <dimen name="expanding_entry_card_item_header_only_margin_bottom">2dp</dimen>
    <dimen name="expanding_entry_card_item_no_icon_margin_top">6dp</dimen>

    <dimen name="quickcontact_suggestion_card_icon_height">24dp</dimen>
    <dimen name="quickcontact_suggestion_card_icon_width">24dp</dimen>
    <dimen name="quickcontact_suggestion_card_image_spacing">20dp</dimen>
    <dimen name="quickcontact_suggestion_card_layout_margin">8dp</dimen>
    <dimen name="quickcontact_suggestion_card_checkbox_right_margin">16dp</dimen>

    <!-- The width the that the tabs occupy in the ActionBar when in landscape mode.
         426dp is the height of a "small" screen. We should leave 240dp for
         the title and menu items -->
+18 −0
Original line number Diff line number Diff line
@@ -773,4 +773,22 @@

    <!-- Quick contact display name with phonetic name -->
    <string name="quick_contact_display_name_with_phonetic"><xliff:g id="display_name">%s</xliff:g> (<xliff:g id="phonetic_name">%s</xliff:g>)</string>

    <!-- Button used in quick contact suggestion card to merge selected contacts. [CHAR LIMIT=30]-->
    <string name="quickcontact_suggestion_merge_button">Merge</string>

    <!-- Suggestions number in quick contact suggestion card [CHAR LIMIT=30] -->
    <plurals name="quickcontact_suggestions_number">
        <item quantity="one">1 suggested contact</item>
        <item quantity="other"><xliff:g id="count">%d</xliff:g> suggested contacts</item>
    </plurals>

    <!-- Account type number for suggestions in quick contact suggestion card [CHAR LIMIT=30]-->
    <plurals name="quickcontact_suggestion_account_type_number">
        <item quantity="one"></item>
        <item quantity="other">(<xliff:g id="count">%d</xliff:g>)</item>
    </plurals>

    <!-- Account type with number in quick contact suggestion card [CHAR LIMIT=30]-->
    <string name="quickcontact_suggestion_account_type"><xliff:g id="account_type">%s</xliff:g><xliff:g id="account_type_number">%s</xliff:g></string>
</resources>
Loading