Is 'sw' and 'w' size qualifier the same thing?


#1

Hi,

On page 325 it talks about how the ‘sw’ (smallest width) qualifier provides resources when a device is above a certain size. However, when I created the directory the default is just ‘w’ so values-w600dp. It seems to work and do the correct thing.

Is there a difference between the ‘sw’ and ‘w’ qualifier I should know about?


#2

The w qualifier changes across rotation. The sw qualifier is fixed to whatever is the smallest width of the device and does not change across rotation.

For example, in portrait, your code may not show 2 panes (depending on the device). That could be your desired behavior, just depends on how you want the app to work.


#3

Aha that’s the explanation I was missing, thanks cstewart.


#4

Sir, my app is crashed when i set aliases resource.