title: Persistent Toast Message: Toast won't disappear after execution
body: <p>I have a toast message that doesn't disappear after execution. Im guessing it has something to do with it being in the loop but I'm not sure. Can someone help me figure out what why the toast message doesn't disparate? </p>
  
  <pre><code> @Override
  public void onClick(View v) {
      int index = 0;
      for(int i= 0; i&lt;userArray.length; i++){
          if(email.getText().toString().equals(userArray[i])){
              index = i;
          }
          if(passArray[index].equals(password.getText().toString())){
              Toast.makeText(getBaseContext(), "SUCCESS!", Toast.LENGTH_SHORT).show();
  
          } else {
              Toast.makeText(getBaseContext(), "INVALID LOGIN", Toast.LENGTH_SHORT).show();
          }
      }
      Intent mainIntent = new Intent(LoginActivity.this, MainActivity.class);
      startActivityForResult(mainIntent, 0);
  }
  </code></pre>
  
  <p>}</p>