title: Change a specific row in a ArrayAdapter ListView Android
body: <p>I am trying to change the color on a specific row depending on different states. This is the code i have at the moment.</p>
  
  <pre><code> public View getView(int position, View convertView, ViewGroup parent) {
  
    View row=convertView;
  
       if (row==null) {                                                    
           LayoutInflater inflater=getLayoutInflater();
  
           row=inflater.inflate(R.layout.doit, parent, false);
       }
  
       TextView label = (TextView) row.findViewById(R.id.mess);
  
       label.setText(ArrayAdapter.getItem(position));
  
       switch(mState){
       case STATE1:
  
        label.setTextColor(Color.WHITE);
        break;
       case STATE2:
        label.setTextColor(Color.BLACK);
        break;
       case STATE3:
        label.setTextColor(Color.YELLOW);
        break;
       }
  
  
       return(row);
   }
  </code></pre>
  
  <p>}</p>
  
  <p>The code kinda works..but it changes all the rows. Any ideas?</p>