title: Android : setBackgroundColor not working
body: <p>I want to make a loop which changes the color of the ImageView but it isn't working.. 
  In the XML file of the Activity I gave some jpg in the background attribute of <code>ImageView</code>. The colors are from the String Array. Log shows iteration is ok.. It changes <code>ImageView</code> to white (not visible? ) </p>
  
  <p>Code:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      ImageView imV;
      int totalStep = 4;
      int step = 0;
      private Handler handler;
      String colors[] = {"#000000", "#ff4455", "#ff1133", "#ff0000", "#00ffff"};
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          imV = (ImageView) findViewById(R.id.imageView);
  
          handler = new Handler();
          handler.postDelayed(runnable, 1000);
      }
  
      private Runnable runnable = new Runnable() {
          @Override
          public void run() {
              if (step == totalStep) {
                  step = 0;
              } else {
                  step++;
              }
              imV.setBackgroundColor(Color.parseColor(colors[step]));
              Log.d("Tick", " " + step);
              Log.d("color", " _ " + colors[step]);
  
              handler.postDelayed(this, 1000);
          }
      };
  }
  </code></pre>