|
13 | 13 | import android.content.Context; |
14 | 14 | import android.database.Cursor; |
15 | 15 | import android.database.MatrixCursor; |
| 16 | +import android.graphics.Typeface; |
16 | 17 | import android.support.v4.app.FragmentManager; |
17 | 18 | import android.view.LayoutInflater; |
18 | 19 | import android.view.MotionEvent; |
@@ -61,9 +62,13 @@ public void setMapFragment(MapFragment mapFragment) { |
61 | 62 | @Override |
62 | 63 | public View newView(final Context c, Cursor cursor, ViewGroup parent) { |
63 | 64 | LayoutInflater inflater = LayoutInflater.from(c); |
64 | | - View v = inflater.inflate(android.R.layout.simple_list_item_1, parent, false); |
65 | | - assert v != null; |
66 | | - v.setOnClickListener(new View.OnClickListener() { |
| 65 | + final TextView textView = |
| 66 | + (TextView) inflater.inflate(R.layout.search_dropdown_item, parent, false); |
| 67 | + final Typeface typeface = Typeface.createFromAsset(c.getAssets(), |
| 68 | + "fonts/RobotoCondensed-Light.ttf"); |
| 69 | + textView.setTypeface(typeface); |
| 70 | + assert textView != null; |
| 71 | + textView.setOnClickListener(new View.OnClickListener() { |
67 | 72 | @Override |
68 | 73 | public void onClick(View view) { |
69 | 74 | TextView tv = (TextView) view; |
@@ -98,7 +103,7 @@ public boolean onTouch(View view, MotionEvent motionEvent) { |
98 | 103 | return false; |
99 | 104 | } |
100 | 105 | }); |
101 | | - return v; |
| 106 | + return textView; |
102 | 107 | } |
103 | 108 |
|
104 | 109 | private void dismissKeyboard() { |
|
0 commit comments