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

Commit f3170880 authored by Andrew Lee's avatar Andrew Lee
Browse files

Cardify the call log list items!

+ Added card view dependencies to makefile.
+ Convert call log list items to use card views.
+ Cleaned up code style and unused views in fragment xml.
- Removed deprecated expand code (more work to be done here).
- Removed now-unused constants.

Bug: 19372817
Change-Id: I237cf214f8f052de5fb1f41908d6012f52de994e
parent f7a478d2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -18,10 +18,12 @@ res_dirs := res \
    $(phone_common_dir)/res

LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs))
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs)) \
    frameworks/support/v7/cardview/res

LOCAL_AAPT_FLAGS := \
    --auto-add-overlay \
    --extra-packages android.support.v7.cardview \
    --extra-packages android.support.v7.recyclerview \
    --extra-packages com.android.incallui \
    --extra-packages com.android.contacts.common \
@@ -33,6 +35,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
    android-ex-variablespeed \
    android-support-v13 \
    android-support-v4 \
    android-support-v7-cardview \
    android-support-v7-recyclerview \
    com.android.services.telephony.common \
    com.android.vcard \
+5 −29
Original line number Diff line number Diff line
@@ -28,36 +28,11 @@
        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"
            />
        <include layout="@layout/call_log_voicemail_status" />

    </FrameLayout>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
@@ -65,7 +40,8 @@
        <android.support.v7.widget.RecyclerView android:id="@+id/recycler_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/background_dialer_list_items" />
            android:background="@color/background_dialer_list_items"
            android:padding="8dp" />

        <include
            android:id="@+id/empty_list_view"
+35 −27
Original line number Diff line number Diff line
@@ -37,13 +37,17 @@

    <!-- Linear layout to separate the primary area containing the contact badge and caller
         information and the secondary action (call details / play voicemail). -->
    <LinearLayout
    <android.support.v7.widget.CardView
        xmlns:card_view="http://schemas.android.com/apk/res-auto"
        android:id="@+id/call_log_row"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="4dp"
        android:baselineAligned="false"
        android:orientation="vertical"
        android:gravity="center_vertical" >
        android:gravity="center_vertical"
        card_view:cardCornerRadius="4dp"
        card_view:cardBackgroundColor="@color/background_dialer_list_items">

        <!-- Primary area containing the contact badge and caller information -->
        <LinearLayout
@@ -60,6 +64,7 @@
            android:focusable="true"
            android:nextFocusRight="@+id/call_back_action"
            android:nextFocusLeft="@+id/quick_contact_photo" >

            <QuickContactBadge
                android:id="@+id/quick_contact_photo"
                android:layout_width="@dimen/contact_photo_size"
@@ -67,16 +72,16 @@
                android:paddingTop="2dp"
                android:nextFocusRight="@id/primary_action_view"
                android:layout_gravity="top"
                android:focusable="true"
                />
                android:focusable="true" />

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:orientation="vertical"
                android:gravity="center_vertical"
                android:layout_marginStart="@dimen/call_log_start_margin"
                >
                android:layout_marginStart="@dimen/call_log_start_margin">

                <TextView
                    android:id="@+id/name"
                    android:layout_width="wrap_content"
@@ -85,8 +90,8 @@
                    android:layout_marginEnd="@dimen/call_log_icon_margin"
                    android:textColor="?attr/call_log_primary_text_color"
                    android:textSize="@dimen/call_log_primary_text_size"
                    android:singleLine="true"
                    />
                    android:singleLine="true" />

                <TextView
                    android:id="@+id/voicemail_transcription"
                    android:layout_width="wrap_content"
@@ -96,22 +101,22 @@
                    android:textSize="@dimen/call_log_secondary_text_size"
                    android:singleLine="true"
                    android:ellipsize="marquee"
                    android:visibility="gone"
                    />
                    android:visibility="gone" />

                <LinearLayout
                    android:id="@+id/call_type"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    >
                    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"
                        />
                        android:layout_gravity="center_vertical" />

                    <TextView
                        android:id="@+id/call_location_and_date"
                        android:layout_width="wrap_content"
@@ -120,9 +125,10 @@
                        android:layout_gravity="center_vertical"
                        android:textColor="?attr/call_log_secondary_text_color"
                        android:textSize="@dimen/call_log_secondary_text_size"
                        android:singleLine="true"
                        />
                        android:singleLine="true" />

                </LinearLayout>

                <TextView
                    android:id="@+id/call_account_label"
                    android:layout_width="wrap_content"
@@ -131,9 +137,10 @@
                    android:textColor="?attr/call_log_secondary_text_color"
                    android:textSize="@dimen/call_log_secondary_text_size"
                    android:visibility="gone"
                    android:singleLine="true"
                    />
                    android:singleLine="true" />

            </LinearLayout>

            <ImageView
                android:id="@+id/call_indicator_icon"
                android:layout_width="wrap_content"
@@ -144,9 +151,7 @@
                android:tint="@color/recent_call_log_item_phone_icon_tint"
                android:alpha="0.3"
                android:importantForAccessibility="no"
                android:visibility="gone"
                />
        </LinearLayout>
                android:visibility="gone" />

            <!-- Viewstub with additional expandable actions for a call log entry -->
            <ViewStub android:id="@+id/call_log_entry_actions_stub"
@@ -154,6 +159,9 @@
                      android:layout="@layout/call_log_list_item_actions"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"/>

        </LinearLayout>

    </android.support.v7.widget.CardView>

</LinearLayout>
+1 −2
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@
    <!-- Background color for search results and call details -->
    <color name="background_dialer_results">#f9f9f9</color>
    <!-- Background color of dialer list items (contacts, call log entries) -->
    <color name="background_dialer_list_items">@color/background_dialer_light</color>
    <color name="background_dialer_list_items">@color/background_dialer_white</color>
    <color name="background_dialer_details_list_items">@color/background_dialer_results</color>

    <!-- Color of the 1dp divider that separates favorites -->
@@ -84,7 +84,6 @@
    <!-- Color of the bottom border below the contacts grid on the main dialer screen. -->
    <color name="contacts_grid_bottom_border_color">#16000000</color>

    <color name="call_log_expanded_background_color">#ffffff</color>
    <!-- Color of actions in expanded call log entries.  This text color represents actions such
         as call back, play voicemail, etc. -->
    <color name="call_log_action_text">@color/dialer_theme_color</color>
+0 −2
Original line number Diff line number Diff line
@@ -111,8 +111,6 @@
    <dimen name="call_log_list_item_actions_text_size">12sp</dimen>
    <!-- Height of the call log actions section for each call log entry -->
    <dimen name="call_log_action_height">44dp</dimen>
    <!-- Z Translation of expanded call log items. -->
    <dimen name="call_log_expanded_translation_z">2dp</dimen>
    <dimen name="call_log_day_group_padding_top">15dp</dimen>
    <dimen name="call_log_day_group_padding_bottom">9dp</dimen>

Loading