summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorBrian Attwell <brianattwell@google.com>2014-05-29 13:45:56 -0700
committerBrian Attwell <brianattwell@google.com>2014-06-11 13:14:36 -0700
commit440a8fb48d25b4281bd4b00ca5070da59129be14 (patch)
treec87782a47be7de5f33607e068ee20a61aac7bb1a /res/layout
parent6ee0728b5844ae60adb0d27d5f9b54d9720a11a0 (diff)
downloadandroid_packages_apps_ContactsCommon-440a8fb48d25b4281bd4b00ca5070da59129be14.tar.gz
android_packages_apps_ContactsCommon-440a8fb48d25b4281bd4b00ca5070da59129be14.tar.bz2
android_packages_apps_ContactsCommon-440a8fb48d25b4281bd4b00ca5070da59129be14.zip
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
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/contact_tile_frequent.xml82
-rw-r--r--res/layout/contact_tile_starred.xml9
2 files changed, 31 insertions, 60 deletions
diff --git a/res/layout/contact_tile_frequent.xml b/res/layout/contact_tile_frequent.xml
index 404b2feb..880ce810 100644
--- a/res/layout/contact_tile_frequent.xml
+++ b/res/layout/contact_tile_frequent.xml
@@ -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">
+ android:background="?android:attr/selectableItemBackground">
- <RelativeLayout
+ <LinearLayout
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:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ 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:focusable="true" />
+ android:layout_marginEnd="?list_item_gap_between_image_and_text"/>
- <LinearLayout
+ <TextView
+ android:id="@+id/contact_tile_name"
android:layout_width="match_parent"
- android:layout_height="64dip"
- android:orientation="vertical"
- android:layout_alignParentBottom="true"
- android:gravity="center_vertical"
- android:paddingLeft="8dip"
- android:paddingRight="80dip"
- android:paddingStart="8dip"
- android:paddingEnd="80dip">
-
- <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: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>
+ android:layout_height="wrap_content"
+ 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" />
+
+ </LinearLayout>
</view>
diff --git a/res/layout/contact_tile_starred.xml b/res/layout/contact_tile_starred.xml
index ed290420..3d9abb58 100644
--- a/res/layout/contact_tile_starred.xml
+++ b/res/layout/contact_tile_starred.xml
@@ -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"