title: Listview how to check if 1 or more string exist
body: <p>Here is the code I am testing but with no success. I am trying to search for the string <code>demooo</code>. In this test, the <code>demooo</code> can be in very first index or anywhere, so I am trying to loop through the <code>listview</code> to find it. I'm not sure why it's not working.</p>
  
  <pre><code>addButtonn.setOnClickListener(new View.OnClickListener() {
              public void onClick(View v) {
                  //check listview
                  Context context = getApplicationContext();
                  String strName = "demooo";
                  listView = (ListView) findViewById(R.id.listViewfind);
                  for (int i = 0; i &lt; listView.getAdapter().getCount(); i++) {
                      if (strName.equals((String) listView.getAdapter().getItem(i).toString())) {
                          CharSequence text = "fffffffffffffffound";
                          int duration = Toast.LENGTH_SHORT;
                          Toast toast = Toast.makeText(context, text, duration);
                          toast.show();
                          return;
                      }else{
                          CharSequence text = "nooooooooooot found";
                          int duration = Toast.LENGTH_SHORT;
                          Toast toast = Toast.makeText(context, text, duration);
                          toast.show();
                          return;
                  }
              }
          }
      });
  </code></pre>
  
  <p>Add item to listview:</p>
  
  <pre><code>addButton.setOnClickListener(new View.OnClickListener() {
              public void onClick(View v) {
                  String strUserName = editText.getText().toString();
                  strUserName = editText.getText().toString();
                  if (TextUtils.isEmpty(strUserName)) {
                      editText.setError("cannot be emty");
                      return;
                  }
                  listItems.add(editText.getText().toString());
                  adapter.notifyDataSetChanged();
              }
          });
          listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
              @Override
              public void onItemClick(AdapterView&lt;?&gt; a, View v, int position,
                                      long id) {
                  Toast.makeText(threee.this, "Clicked " + position, Toast.LENGTH_LONG)
                          .show();
              }
          });
  </code></pre>