Note that there are some explanatory texts on larger screens.

plurals
  1. POAutoCompeleteTextView like Android default Messaging Application
    primarykey
    data
    text
    <p>I need to implement the AutoCompeleteTextView like default Messaging application. I have already implemented it as given in first image. Now I want exactly as given in second image.</p> <p><img src="https://i.stack.imgur.com/3To1R.png" alt="alt text"></p> <p>The Following code snippet I am using:</p> <pre><code>Cursor cursor = this.getContentResolver().query(Phone.CONTENT_URI, new String[] { Phone.DISPLAY_NAME, Phone.NUMBER }, null, null, Phone.DISPLAY_NAME + " ASC"); startManagingCursor(cursor); cursor.moveToFirst(); int i = 0; do { HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;(); map.put("No", cursor.getString(cursor.getColumnIndex(Phone.NUMBER)) .replace("-", "")); map.put("Name", cursor.getString(cursor.getColumnIndex(Phone.DISPLAY_NAME))); list.add(map); i++; } while (cursor.moveToNext()); SimpleAdapter adapter = new SimpleAdapter(this, list, R.layout.autocomplete, new String[] { "Name", "No" }, new int[] { R.id.name, R.id.number }); txt_mobile_no.setAdapter(adapter); txt_mobile_no .setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer()); </code></pre> <p>and the layout file is as below: <strong>autocomplete.xml</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="40dip" &gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/name" android:textSize="16dip" android:layout_weight="1" android:textColor="#000000" android:paddingLeft="6dip" android:paddingTop="10dip"/&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/number" android:textSize="16dip" android:layout_weight="1" android:textColor="#000000" android:paddingTop="10dip"/&gt; &lt;/LinearLayout&gt; </code></pre> <p>Now please could anybody suggest me a better way to implement the feature.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload