title: Android View.bringToFront() causes flicker
body: <p>I have several Views within a FrameLayout. There is a transition I have written where each view has a custom Animation class applied. During this transition, I need to bring the View at the bottom of the z-order to the front. I do this with:</p>
  
  <pre><code>    public static void putBackAtFront(ViewGroup v) 
      {
          v.getChildAt(0).bringToFront();
          refreshEverything(v);
      }
  </code></pre>
  
  <p>This gets called from within the applyTransformation() of my custom Animation. </p>
  
  <p>i.e.</p>
  
  <pre><code>public class PivotAnimation extends Animation {
      private View view;
      ...
      @Override
      protected void applyTransformation(float interpolatedTime, Transformation t) 
      {
          ...
          if(interpolatedTime &gt;= 1.f &amp;&amp; isAtBack(view))
          {
             putBackAtFront(view);
          }
          ...
      }
      ...
  }
  </code></pre>
  
  <p>refreshEverything() calls invalidate() and requestLayout() on the parent FrameLayout and all its children.</p>
  
  <p>Everything works perfectly except that when putBackAtFront() is called, the View that is now at the bottom disappears for a single frame before instantly re-appearing, resulting in a noticeable flicker. I've also tried without calling refreshEverything(), it makes no difference.</p>
  
  <p>I'm targeting API Level 7.</p>