Android Question Designer Variants - Am I missing something obvious?

doncx

Active Member
Licensed User
Longtime User
I can't figure out how to change the order of variants. And it matters.

I have a phone sized variant and a tablet sized variant. Most of my designer layout files have the phone size listed first, but not all.

When I paste views from a designer file into another designer file, if the views are in different order they don't paste properly.

But for the life of me I can't figure out how to change the order.

Does anyone know?

Thanks
 

emexes

Expert
Licensed User
I can't figure out how to change the order of variants. And it matters.

When I paste views from a designer file into another designer file, if the views are in different order they don't paste properly.

Order of variants, or order of views?
 
Upvote 0

doncx

Active Member
Licensed User
Longtime User
It is also my question.
Variants. Erel is correct that the proper variant is selected at runtime regardless of the order, however, when I copy and paste views from one layout file to another where the variant order is different, the pasted views are wildly out of place and sized incorrectly. This only happens when the variants are in a different order. When the variants are listed in the same order in both the source and destination layout files, then the pasting goes very well.

So, I'm looking for a way to change the order of variants. Perhaps I just need to create a new layout file with the variants properly ordered.
 
Upvote 0

RichardN

Well-Known Member
Licensed User
Longtime User
As I have found to my cost in the past.... The variant loaded by the OS is not always the one you presume!

If you are having difficulty with screen layouts then perhaps put some debug code in to reveal which variant is actually in use..... You may be surprised!
 
Upvote 0
Top