androidandroid-layoutqualifiers

Android | More than one layout qualifiers results in which operation?


I know what are the qualifiers at the time of layout creation time. My question is if I mention more than one qualifier, whether the qualifiers will be affected by AND (&&) operation or they will be affected by OR (||) operation.

Look at this image, Layout Creation

What I mean is here I Have chosen two qualifiers sw360dp and XX-High Density. So, What is true from below.

  1. Layout file will be called when screen's smallest width is 360dp as well as Screen is having High Density.

  2. Layout file will be called when smallest width is 360dp or Screen has high density. Resulting in if one is true other qualifier doesn't matter.

I did little bit of research but, Can't seem to find a statisfying answer.


Solution

  • I think it should be OR as it will create a separate layout directory for each qualifier. As explained below in Android documentation.

    sw360dp XX-High Density

    https://developer.android.com/training/multiscreen/screensizes#alternative-layouts

    Thanks!