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

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -