title: Get background color of a listview
body: <p>I need to change the background color of a listview many times, but I don't know how to obtain the color that the listview has before clicking on it.</p>
  
  <p>I have this code:</p>
  
  <pre><code>if(colores.get(i).equals("0"))
                  {
                      listView.getChildAt(i).setBackgroundColor(Color.GREEN);
                  }
                  else if(colores.get(i).equals("1"))
                  {
                      listView.getChildAt(i).setBackgroundColor(Color.RED);
                  }
                  else if(colores.get(i).equals("2"))
                  {
                      listView.getChildAt(i).setBackgroundColor(Color.YELLOW);
                  }
                  else
                  {
                      listView.getChildAt(i).setBackgroundColor(Color.WHITE);
                  }
  </code></pre>
  
  <p>And I can change the color, but I need also to change the color when I click on one item of the listview, but I don't know how to know the color that it has previously. </p>
  
  <p>Can anyone help me? Thanks! :) </p>