Hey,
Z-Indexing is kinda confusing in Android. ( Thank you Google :P ) Especially if you want to use a custom loading indicator and your other views just pop-up front of your loading indicator. That could be very annoying.
Fortunately, the solution is extremely easy ( IDK but I could not find this basic solution easily ). Just one single method will let you bring your view to the front and the magic words are :
myView.bringToFront();
“.bringToFront()” method will let you a perfect indicator view :)
Also, there is another option to use parent-children relationship views.
bringChildToFront(View child);
“bringChildToFront(View child)” will let you to z-index which child do you want to use :)
That’s it :)
If you have any question, ask me :)