I want to change z order of some views during animation

On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top.

This is what i am trying. 

```
myView.bringToFront();
((View)myView.getParent()).invalidate();

```

How to make it work on older devices ?
['https://Stackoverflow.com/questions/25306180', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2136812/']
```
   /**
     * Change the view's z order in the tree, so it's on top of other sibling
     * views. This ordering change may affect layout, if the parent container
     * uses an order-dependent layout scheme (e.g., LinearLayout). Prior
     * to {@link android.os.Build.VERSION_CODES#KITKAT} this
     * method should be followed by calls to {@link #requestLayout()} and
     * {@link View#invalidate()} on the view's parent to force the parent to redraw
     * with the new child ordering.
     *
     * @see ViewGroup#bringChildToFront(View)
     */
    public void bringToFront() {
        if (mParent != null) {
            mParent.bringChildToFront(this);
        }
    }

```

according to this I was simply missing the line

```
((View)myView.getParent()).requestLayout();

```

and it worked!
If the parent view is a relativelayout, then it might work or it might not work. I tried `bringToFront`, `requestLayout`, and `removeView; addView`, but no luck. My solution was to put everything inside a framelayout. What I needed on top was moved the buttom of the framelayout with visibility invisible, and then in code it was made visible.