Skip to content

Commit 9303f9c

Browse files
committed
Added person ImageView to AutoCompleteTextView dropdown
1 parent 28baa05 commit 9303f9c

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
</android.support.design.widget.AppBarLayout>
2323

2424
<include layout="@layout/content_main" />
25-
25+
2626
</android.support.design.widget.CoordinatorLayout>
Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:id="@+id/autoCompleteName"
4-
style="?android:attr/dropDownItemStyle"
5-
android:layout_width="match_parent"
6-
android:layout_height="?android:attr/listPreferredItemHeight"
7-
android:ellipsize="marquee"
8-
android:textAppearance="?android:attr/textAppearanceLargePopupMenu" />
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="fill_parent"
4+
android:layout_height="wrap_content"
5+
android:orientation="horizontal">
6+
7+
<ImageView
8+
android:id="@+id/autoCompleteImage"
9+
android:layout_width="48dp"
10+
android:layout_height="48dp"
11+
android:layout_margin="8dp"
12+
android:cropToPadding="true"
13+
android:src="@mipmap/ic_launcher" />
14+
15+
<TextView
16+
android:id="@+id/autoCompleteName"
17+
style="?android:attr/dropDownItemStyle"
18+
android:layout_width="match_parent"
19+
android:layout_height="?android:attr/listPreferredItemHeight"
20+
android:ellipsize="marquee"
21+
android:textAppearance="?android:attr/textAppearanceLargePopupMenu" />
22+
23+
</LinearLayout>

0 commit comments

Comments
 (0)