WISH: Z-Order property / absolute value within designer

JohnK

Active Member
Licensed User
Longtime User
Unless I am mistaken, the only way to control the z-order of objects within the designer is with send to back, or send to front. This gets a little tedious when you have a number of views and need to insert a new one somewhere in the middle of the z-order of what is already there.
 

joseluis

Active Member
Licensed User
Longtime User
I don't think Erel can do much about it, that doesn't seem possible even using the Android SDK. Your only tools are 1) the order in which you add the views. 2) you can bring to front or send to back any view, as you previously said.
 

JohnK

Active Member
Licensed User
Longtime User
I don't think Erel can do much about it, that doesn't seem possible even using the Android SDK. Your only tools are 1) the order in which you add the views. 2) you can bring to front or send to back any view, as you previously said.

Everytime you open the designer, it loads the views in the same order, so it is obviously stored. If it is stored in a specific order, than there would clearly be a way to manipulate the order when saving it back to the file.

Also, in the generated files folders (Objects\res\layout\widgetservice_layout.xml) the Z-order is basically there via the order the XML is written out in. Being able to control this order I am sure is more than possible.

On a side note, now seeing this file will be helpful to understand where the Z-Order is actually not correct. But of course, I will have to correct it using send to back & send to front, generate, view etc etc. Painful.
 

joseluis

Active Member
Licensed User
Longtime User
Well, you asked for a way to change the z-order of a single view once all the views have their z. Their Z is defined by the order they are originally added to the activity/panel, or the order they appear in the XML.

What I said is that I don't think that is possible to change a single view to an intermediate Z position. The only thing that seems possible is to do by it calling sendtobackground and bringtotop on the needed views until you have the order you want.
 
Top