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

Commit fd51508e authored by Flavio Lerda's avatar Flavio Lerda
Browse files

Call log item layout changes for selection highlight.

Move the quick contact badge into the primary action layout, so that the
highlight will wrap around it.

Delete the no-longer-in-use unheard image view.

It might be possible to flatten one level of the hierarchy by removing
the RelativeLayout, but I will look into that in a follow-up.

Bug: 5290460
Change-Id: I9fc7e406ceee0d8971c2d4e7d92c4cd7ff417e1a
parent bda41c3e
Loading
Loading
Loading
Loading
+49 −50
Original line number Diff line number Diff line
@@ -36,19 +36,10 @@
        android:id="@+id/call_log_item"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/call_log_outer_margin"
        android:layout_marginRight="@dimen/call_log_outer_margin"
        android:gravity="center_vertical"
    >
        <!-- Only one of the next two is visible at one time. The other one is set to INVISIBLE -->
        <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:layout_alignParentLeft="true"
            android:layout_centerVertical="true"
            android:layout_marginLeft="@dimen/call_log_outer_margin"
            android:layout_marginTop="@dimen/call_log_inner_margin"
            android:layout_marginBottom="@dimen/call_log_inner_margin"
        />
        <LinearLayout
            android:id="@+id/divider"
            android:layout_width="wrap_content"
@@ -59,16 +50,6 @@
            android:layout_alignBottom="@+id/primary_action_view"
            android:orientation="horizontal"
        >
            <ImageView
                android:id="@+id/unheard_icon"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:paddingRight="@dimen/call_log_inner_margin"
                android:scaleType="center"
                android:src="@drawable/ic_unheard_voicemail_holo_dark"
                android:visibility="gone"
                android:contentDescription="@string/description_call_log_unheard_voicemail"
            />
            <View
                android:layout_width="1px"
                android:layout_height="@dimen/call_log_call_action_size"
@@ -82,7 +63,7 @@
                android:paddingLeft="@dimen/call_log_inner_margin"
                android:paddingTop="@dimen/call_log_inner_margin"
                android:paddingBottom="@dimen/call_log_inner_margin"
                android:paddingRight="@dimen/call_log_outer_margin"
                android:paddingRight="@dimen/call_log_inner_margin"
                android:scaleType="center"
                android:background="?android:attr/selectableItemBackground"
            />
@@ -90,15 +71,32 @@
        <LinearLayout
            android:id="@+id/primary_action_view"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_toRightOf="@id/quick_contact_photo"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@id/divider"
            android:layout_alignParentLeft="true"
            android:layout_alignWithParentIfMissing="true"
            android:layout_centerVertical="true"
            android:padding="@dimen/call_log_inner_margin"
            android:orientation="vertical"
            android:paddingRight="@dimen/call_log_inner_margin"
            android:paddingTop="@dimen/call_log_inner_margin"
            android:paddingBottom="@dimen/call_log_inner_margin"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:background="?android:attr/selectableItemBackground"
            android:focusable="true"
        >
            <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:layout_alignParentLeft="true"
                android:layout_centerVertical="true"
            />
            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:gravity="center_vertical"
                android:layout_marginLeft="@dimen/call_log_inner_margin"
            >
                <TextView
                    android:id="@+id/name"
@@ -141,6 +139,7 @@
                    />
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>
    </RelativeLayout>

    <TextView