0

I found this but which is not clear to me is ; When having many layouts with fragments as well, how to add

/res/layout/layout.xml         // Default layout
 /res/layout-small/layout.xml   // Small screens
 /res/layout-large/layout.xml   // Large screens
 /res/layout-xlarge/layout.xml  // Ex

/res/layout-small-land/layout.xml      // Small screens, landscape view
 /res/layout-small-portrait/layout.xml  // Small screens, portrait view

To make the app compatible with any screen sizes? Also for one UI is it required to design required view x6(layout,small,large,xlarge,small-land,small-portrait) times of the screen sizes?

Sachz
  • 391
  • 5
  • 21
  • This should help: https://developer.android.com/training/multiscreen/screensizes – SammyT Sep 29 '19 at 04:20
  • Thank you i have already noticed that. Instead of using that but my concern is when using "<**support-screen**> as i understood it is required to define mentioned layouts for different sizes. If so when there are multiple layouts is it required to create four times layout per one UI ? – Sachz Sep 29 '19 at 05:41
  • No you shouldn't need to. I usually just test them on different screen sizes and if I see something is not fitting or needs fixing. I copy the UI layout into the folder and then modify what needs fixing. Sometimes you can just use different dimensions files instead of having to have a whole new layout. See the answer on this page for an example of how to use dimensions https://stackoverflow.com/questions/32860815/how-to-define-dimens-xml-for-every-different-screen-size-in-android – SammyT Oct 04 '19 at 05:48
  • 1
    Mm.. I got it. Thank you for the reference. – Sachz Oct 05 '19 at 23:51

1 Answers1

0
You can check this :

res/layout/main_activity.xml                # For handsets
res/layout-land/main_activity.xml           # For handsets in landscape
res/layout-sw600dp/main_activity.xml        # For 7” tablets
res/layout-sw600dp-land/main_activity.xml   # For 7” tablets in landscape