A me sembra che funzioni. Non badare molto al metodo che ho usato per muovere i pannelli, cercato al volo e trovato quella classe DraggableView.
Ovviamente se serve puoi usare SendToBack invece di BringToFront.
It seems to me that it works. Do not pay much attention to the method I used to move the panels, I searched quickly and found that DraggableView class.
Obviously, if needed, you can use SendToBack instead of BringToFront, in the loop.
Forse non mi sono spiegato bene. Il problema è che il movimento dovrebbe anche modificare lo z-order, in modo che il panel con label 1 spostandolo sotto porti il proprio z-index a 2. Usando un bring to front su tutti gli elementi, alla fine questi non vengono ordinati. L'algoritmo è abbastanza più complesso di quel che sembra, perché non hai il controllo diretto sullo z-index. Oltretutto la draggableview class modifica ulteriormente quest'ordine, perché aggiunge elementi all'activity
Maybe I did not say it clear enough. The problem is that the movement should also modify the z-order, so that the panel with label 1 moving it below brings its z-index to 2. Using a bring to front on all the elements, eventually these are not sorted. The algorithm is quite more complex than it seems, because you do not have direct control over the z-index. Moreover, the draggableview class further modifies this order, because it adds elements to the activity