title: You must supply a resource ID for a TextView
body: <p>I searched existing tutorials related this question, And i followed that example. But still im getting same error. When i change the android.R.layout.simple_list_item1 line it won't work.</p>
  
  <p>MyCode:</p>
  
  <pre><code>public class Lisearch extends Activity {
      private ListView lv;
      private EditText et;
      private String listview_array[] = { "ONE", "TWO", "THREE", "FOUR", "FIVE",
      "SIX", "SEVEN", "EIGHT", "NINE", "TEN" };
      private ArrayList&lt;String&gt; array_sort= new ArrayList&lt;String&gt;();
      int textlength=0;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_lisearch);
          //TextView tv=(TextView)findViewById(R.id.text);
          lv = (ListView) findViewById(R.id.ListView01);
          et = (EditText) findViewById(R.id.EditText01);
          //lv.setAdapter(new ArrayAdapter&lt;String&gt;(this,
          //R.layout.activity_lisearch, listview_array));
  
          et.addTextChangedListener(new TextWatcher()
          {
          public void afterTextChanged(Editable s)
          {
                                                                          // Abstract Method of TextWatcher Interface.
          }
          public void beforeTextChanged(CharSequence s,
          int start, int count, int after)
          {
          // Abstract Method of TextWatcher Interface.
          }
          public void onTextChanged(CharSequence s,
          int start, int before, int count)
          {
          textlength = et.getText().length();
          array_sort.clear();
          for (int i = 0; i &lt; listview_array.length; i++)
          {
          if (textlength &lt;= listview_array[i].length())
          {
          if(et.getText().toString().equalsIgnoreCase(
          (String)
          listview_array[i].subSequence(0,
          textlength)))
          {
                                                                                                                          array_sort.add(listview_array[i]);
                                                                                                          }
                                                                                          }
                                                                          }
          lv.setAdapter(new ArrayAdapter&lt;String&gt;
          (Lisearch.this,
          R.layout.activity_lisearch,R.id.text, array_sort));
          }
          });
  
      }
  </code></pre>
  
  <p>Xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
          android:id="@+id/text"
          android:layout_width="wrap_content"
  android:layout_height="wrap_content" &gt;
  &lt;EditText android:id="@+id/EditText01"
  android:layout_height="wrap_content"
  android:layout_width="fill_parent"
  android:hint="Search"&gt;
  &lt;/EditText&gt;
  
  &lt;ListView android:id="@+id/ListView01"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content" &gt;
  &lt;/ListView&gt;
  &lt;/TextView&gt;
  </code></pre>