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

Commit 71d47d15 authored by Brian Attwell's avatar Brian Attwell
Browse files

Styled frequent contacts to look like contact list

Instead of refactoring the ContactTileAdapter to use functionality
from ContactEntryListAdapter, I changed ContactTileAdapter
to use the Attribute#ContactListItemView values when possible.

Also fixed the touch feedback inside contact_tile_starred
(has been broken for a while).

Change-Id: Ib9bafceef518aaa16b77d0b585b06778178b76a4
parent 10c2984a
Loading
Loading
Loading
Loading
+27 −55
Original line number Diff line number Diff line
@@ -17,65 +17,37 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    class="com.android.contacts.common.list.ContactTileFrequentView"
    android:focusable="true"
    android:background="?android:attr/selectableItemBackground"
    android:nextFocusRight="@+id/contact_tile_quick">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <com.android.contacts.common.widget.LayoutSuppressingQuickContactBadge
            android:id="@+id/contact_tile_quick"
            android:layout_width="64dip"
            android:layout_height="64dip"
            android:layout_alignParentEnd="true"
            android:scaleType="centerCrop"
            android:focusable="true" />
    android:background="?android:attr/selectableItemBackground">

    <LinearLayout
        android:layout_width="match_parent"
            android:layout_height="64dip"
            android:orientation="vertical"
            android:layout_alignParentBottom="true"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:gravity="center_vertical"
            android:paddingLeft="8dip"
            android:paddingRight="80dip"
            android:paddingStart="8dip"
            android:paddingEnd="80dip">
        android:paddingStart="?list_item_padding_left"
        android:paddingEnd="?list_item_padding_right"
        android:paddingTop="?list_item_padding_top"
        android:paddingBottom="?list_item_padding_bottom">

        <com.android.contacts.common.widget.LayoutSuppressingImageView
            android:id="@+id/contact_tile_image"
            android:layout_width="?list_item_photo_size"
            android:layout_height="?list_item_photo_size"
            android:scaleType="centerCrop"
            android:layout_marginEnd="?list_item_gap_between_image_and_text"/>

        <TextView
            android:id="@+id/contact_tile_name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
                android:textColor="@color/primary_text_color"
                android:textSize="18sp"
            android:textColor="@android:color/black"
            android:textSize="@dimen/contact_browser_list_item_text_size"
            android:singleLine="true"
            android:fadingEdge="horizontal"
            android:fadingEdgeLength="3dip"
            android:ellipsize="marquee"
            android:textAlignment="viewStart" />

            <TextView
                android:id="@+id/contact_tile_status"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="?android:attr/textColorSecondary"
                android:singleLine="true"
                android:drawablePadding="4dip"
                android:fadingEdge="horizontal"
                android:fadingEdgeLength="3dip"
                android:ellipsize="marquee" />

    </LinearLayout>

        <View
            android:id="@+id/contact_tile_horizontal_divider"
            android:layout_width="match_parent"
            android:layout_height="1px"
            android:background="?android:attr/listDivider"
            android:layout_below="@id/contact_tile_quick" />

    </RelativeLayout>

</view>
+4 −5
Original line number Diff line number Diff line
@@ -16,17 +16,16 @@
<view
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ex="http://schemas.android.com/apk/res-auto"
    android:background="@null"
    class="com.android.contacts.common.list.ContactTileStarredView" >
    class="com.android.contacts.common.list.ContactTileStarredView"
    android:focusable="true"
    android:background="?android:attr/selectableItemBackground">

    <LinearLayout
        android:id="@+id/contact_tile_push_state"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:paddingTop="21dp"
        android:focusable="true"
        android:background="?android:attr/selectableItemBackground">
        android:paddingTop="21dp">
        <view
            android:id="@+id/contact_tile_container"
            android:layout_width="match_parent"