Skip to content

Commit 39c6729

Browse files
committed
Replace PngDrawable in ContactList with VectorDrawable
1 parent b9df9b2 commit 39c6729

File tree

1 file changed

+39
-35
lines changed

1 file changed

+39
-35
lines changed
Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!--
1+
<?xml version="1.0" encoding="utf-8"?><!--
32
Copyright (C) 2015 The Android Open Source Project
43
54
Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,22 +13,21 @@
1413
See the License for the specific language governing permissions and
1514
limitations under the License.
1615
-->
17-
<com.android.messaging.ui.contact.ContactListItemView
18-
xmlns:android="http://schemas.android.com/apk/res/android"
16+
<com.android.messaging.ui.contact.ContactListItemView xmlns:android="http://schemas.android.com/apk/res/android"
1917
xmlns:app="http://schemas.android.com/apk/res-auto"
2018
style="@style/ContactListItemViewStyle"
21-
android:orientation="horizontal"
2219
android:layout_width="match_parent"
2320
android:layout_height="wrap_content"
21+
android:background="?android:attr/selectableItemBackground"
22+
android:orientation="horizontal"
2423
android:paddingTop="8dp"
25-
android:paddingBottom="8dp"
26-
android:background="?android:attr/selectableItemBackground">
24+
android:paddingBottom="8dp">
2725

2826
<TextView
29-
style="@style/ContactListAlphabetHeader"
3027
android:id="@+id/alphabet_header"
31-
android:layout_height="wrap_content"
28+
style="@style/ContactListAlphabetHeader"
3229
android:layout_width="56dp"
30+
android:layout_height="wrap_content"
3331
android:layout_gravity="center_vertical"
3432
android:visibility="gone" />
3533

@@ -42,71 +40,77 @@
4240
android:id="@+id/contact_icon"
4341
android:layout_width="@dimen/contact_list_icon_size"
4442
android:layout_height="@dimen/contact_list_icon_size"
43+
android:clickable="true"
4544
android:importantForAccessibility="no"
46-
app:iconSize="normal"
47-
android:clickable="true" />
45+
app:iconSize="normal" />
4846

4947
<ImageView
5048
android:id="@+id/contact_checkmark"
5149
android:layout_width="@dimen/contact_list_icon_size"
5250
android:layout_height="@dimen/contact_list_icon_size"
53-
android:src="@drawable/ic_checkmark_circle_blue"
54-
android:visibility="gone"
51+
android:background="@drawable/circle_bg"
52+
android:backgroundTint="@color/colorAccent"
53+
android:contentDescription="@null"
5554
android:importantForAccessibility="no"
56-
android:contentDescription="@null"/>
55+
android:padding="8dp"
56+
android:src="@drawable/ic_selected"
57+
android:visibility="gone" />
5758

5859
</FrameLayout>
5960

6061
<LinearLayout
61-
android:orientation="vertical"
6262
style="@style/ContactListItemLinearLayoutStyle"
6363
android:layout_width="match_parent"
6464
android:layout_height="wrap_content"
65-
android:layout_gravity="center_vertical" >
65+
android:layout_gravity="center_vertical"
66+
android:orientation="vertical">
67+
68+
<LinearLayout
69+
android:layout_width="match_parent"
70+
android:layout_height="wrap_content"
71+
android:orientation="horizontal">
6672

67-
<LinearLayout
68-
android:orientation="horizontal"
69-
android:layout_width="match_parent"
70-
android:layout_height="wrap_content">
7173
<TextView
7274
android:id="@+id/contact_name"
75+
style="@style/ContactListItem"
7376
android:layout_width="wrap_content"
7477
android:layout_height="wrap_content"
7578
android:layout_weight="1"
76-
android:paddingBottom="4dp"
77-
android:singleLine="true"
78-
android:maxLines="1"
7979
android:ellipsize="end"
80-
style="@style/ContactListItem" />
80+
android:maxLines="1"
81+
android:paddingBottom="4dp"
82+
android:singleLine="true" />
8183

82-
<ImageView android:id="@+id/work_profile_icon"
83-
android:src="@drawable/ic_work_profile"
84+
<ImageView
85+
android:id="@+id/work_profile_icon"
8486
android:layout_width="wrap_content"
8587
android:layout_height="wrap_content"
86-
android:scaleType="center"
8788
android:layout_gravity="center_vertical"
89+
android:scaleType="center"
90+
android:src="@drawable/ic_work_profile"
8891
android:visibility="gone" />
8992
</LinearLayout>
9093

9194
<LinearLayout
92-
android:orientation="horizontal"
9395
android:layout_width="match_parent"
94-
android:layout_height="wrap_content">
96+
android:layout_height="wrap_content"
97+
android:orientation="horizontal">
98+
9599
<TextView
96100
android:id="@+id/contact_details"
101+
style="@style/ContactListItemDetail"
97102
android:layout_width="0dp"
98-
android:layout_weight="1"
99103
android:layout_height="wrap_content"
100-
android:singleLine="true"
101-
android:maxLines="1"
104+
android:layout_weight="1"
102105
android:ellipsize="end"
103-
style="@style/ContactListItemDetail" />
106+
android:maxLines="1"
107+
android:singleLine="true" />
104108

105109
<TextView
106110
android:id="@+id/contact_detail_type"
111+
style="@style/ContactListItemDetailType"
107112
android:layout_width="wrap_content"
108-
android:layout_height="wrap_content"
109-
style="@style/ContactListItemDetailType" />
113+
android:layout_height="wrap_content" />
110114
</LinearLayout>
111115
</LinearLayout>
112116
</com.android.messaging.ui.contact.ContactListItemView>

0 commit comments

Comments
 (0)