How to Define Layouts for Landscape Orientation in Android? -
how define folder structure layout resources in android project, know there's generic folder structure like:
- layout
- layout-land
- layout-xhdpi
- layout-xxhdpi
but wanna define separate landscape folders xhdpi , xxhdpi well?
- layout-land-xhdpi
- layout-land-xxhdpi
i'm ubable use layout-land-xhdpi landscape resources, android studio preview not picking layout resources layout-land-xhdpi?
you not using correct qualifiers - should large, xlarge, xlarge-land, etc , not xxhdpi, etc:.
here list of qualifiers (from docs) designed work:
res/layout/my_layout.xml // layout normal screen size ("default") res/layout-large/my_layout.xml // layout large screen size res/layout-xlarge/my_layout.xml // layout extra-large screen size res/layout-xlarge-land/my_layout.xml // layout extra-large in landscape orientation res/drawable-mdpi/graphic.png // bitmap medium-density res/drawable-hdpi/graphic.png // bitmap high-density res/drawable-xhdpi/graphic.png // bitmap extra-high-density res/drawable-xxhdpi/graphic.png // bitmap extra-extra-high-density res/mipmap-mdpi/my_icon.png // launcher icon medium-density res/mipmap-hdpi/my_icon.png // launcher icon high-density res/mipmap-xhdpi/my_icon.png // launcher icon extra-high-density res/mipmap-xxhdpi/my_icon.png // launcher icon extra-extra-high-density res/mipmap-xxxhdpi/my_icon.png // launcher icon extra-extra-extra-high-density
that doc must read supporting multiple screens, review (it save lots of time)
Comments
Post a Comment