I need to provide the same layout.xml file for an Activity for several different qualifiers. I know that there\'s a way to just reference one existing layout.xml instead of
Create a wrapper layout my_activity.xml and your layouts for small and xlarge devices.
Your resources should look like:
layout
-> my_activity.xml
-> my_activity_small.xml
-> my_activity_xlarge.xml
Now override my_activity.xml in layout-xlarge and layout-sw600dp:
Your ressources should look like:
layout
-> my_activity.xml <-- includes my_activity_small.xml
-> my_activity_small.xml
-> my_activity_xlarge.xml
layout-xlarge
-> my_activity.xml <-- includes my_activity_xlarge.xml
layout-sw600dp
-> my_activity.xml <-- includes my_activity_xlarge.xml
Use my_activity.xml in your code for loading the layout.
P.S.: You can not point to a layout in another qualifier's directory, as you mentioned in one of the comments.