title: Make for loop delayed for a certain period of time
body: <p>In this code I want to make the for loop get delayed for 700 ms how can I achieve it. In this code the loop gets completed bez of the delay of 700 ms but I want to make each iteration of for loop delayed for 700ms.One more doubt which I should not use <code>Thread.sleep()</code> on UI thread; </p>
  
  <pre><code>for(int i=0;i&lt;Uirkeys.length;i++){
      Handler handler=new Handler();
      handler.postDelayed(new Runnable(){
      @Override
      public void run() {
         copyView.get(cnt1).setBackgroundColor(Color.BLACK);
         TeaxtToSpeach(map.get(Uirkeys[cnt1]));
         cnt1++;
        }
      },700);
  }
  </code></pre>