title: force layout to refresh/repaint android?
body: <p>I want to change position of layout and after 75ms return it to first position to make a movement and that is my code:  </p>
  
  <pre><code>for(int i = 0; i &lt; l1.getChildCount(); i++) {  
      linear = (LinearLayout) findViewById(l1.getChildAt(i).getId());  
      LayoutParams params = new LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);  
      params.bottomMargin = 10;  
      linear.setLayoutParams(params);  
      SystemClock.sleep(75);
  }   
  </code></pre>
  
  <p>The problem is the app is stop for 750ms and don't do anything. I tried  <code>invalidate()</code> , <code>refreshDrawableState()</code>, <code>requestLayout()</code>,  <code>postInvalidate()</code>, and try to call <code>onResume()</code>, <code>onRestart()</code>, <code>onPause()</code> .</p>