title: Comparing user input to String Array list
body: <p>So i've been trying to do this for a couple of days, been searchin' and trying different stuff, but none of them seem to work for me. I wan't to compare user input to the String ArrayList and see if it has that value. I do this to prevent users to send in whatever text they want, only what is in the String ArrayList. Here's the simplified code:</p>
  
  <p>`</p>
  
  <pre><code>        private ArrayList&lt;String&gt; searchNames = new ArrayList&lt;String&gt;();
          EditText nameCaptureNo;
          EditText nameCaptureUz;
          Button send;
          TextView tvTi;
  
  
  
          public void sendTestMsg() {
      // TODO Auto-generated method stub
  
      send.setOnClickListener(new View.OnClickListener() {
  
  
          @Override
  
          public void onClick(View v) {
              // TODO Auto-generated method stub
  
  
               for (int i = 0; i &lt; searchNames.size(); i++) {
                   if            (searchNames.get(i).toString().toUpperCase()
                                        .contains(nameCaptureNo
                           .getText().toString().toUpperCase()) &amp;&amp; 
                                    searchNames.get(i).toString().toUpperCase()
                                        .contains(nameCaptureUz
                           .getText().toString().toUpperCase()) ) {
  
              send.setVisibility(View.VISIBLE);
                     //here goes code wich sends info
          }else{
                       send.setVisibility(View.INVISIBLE);
                           //warning                   
                               tvTi.setText("Izvēlies pilsētu no saraksta!");
                       tvTi.setTextColor(Color.RED);
  
                       continue;
                   }
                   break;
               }
  </code></pre>
  
  <p>`</p>
  
  <p>This is as far as I've gotten. This code seems to be sending the info, but the textview still changes to warning.
  Can you help? Many thanks for reading.</p>