android - How to create layout for "small" devices with sw qualifier? -


as understand layout-small, layout-normal, layout-large deprecated , recommended way of creating layout devices' set use sw. example layout-sw320 devices have 1 of it's side value >= 320dp. "small" , "normal" devices have same sw.

so question how distinguish "small" , "normal" devices sw qualifier? possible? need fall old style ?

the new device dimension classifiers aim support based on smallest width of device; not height. if application relying on height, have support orientations separately or disable them using screenorientation property in androidmanifest.xml <activity> attribute.

for example, using screenorientation="sensorportrait|portrait" allows rely on swxxx only, if support screen orientations can support them with:

  • layout-w320-port, called small and large screens in old specification when in portrait
  • edit: use layout-w320-h426-port , layout-w320-h470-port when want differentiate between 2 in portrait mode specifically.
  • layout-w426-land previous small screen, when in landscape orientation
  • layout-w470-land previous large screen, when in landscape orientation

source

hope helps!


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -