Android layouts for different screen sizes
The answer is already given by user5594218 but looks like you are still unclear. (maybe you are beginner)
So, here is the step by step guideline
Solution 1: (short and simple)
Navigate to
app > src > main > res
Duplicate layout directory by copying and pasting
Rename duplicated Directories e.g
layout-sw300dp
Solution 2: (bit lengthy)
- Create new resource directory:
res > New > Android resource directory
Select
Resource Type
aslayout
Add
sw<N>dp
in Directory name e.glayout-sw300dp
and Hit OK
Navigate to
app > src > main > res
Copy layouts XML file inside new directory
//repeat process for other qualifiers
List of Qualifiers to support all screens:
- layout-sw300dp
- layout-sw330dp
- layout-sw480dp
- layout-sw600dp
- layout-sw720dp
Testing:
This is how it gonna look like, if you did it right.
For more detail and examples, check: Android Application Development All-in-One For Dummies
Create folders like the following
layout-sw300dp
layout-sw330dp
layout-sw480dp
layout-sw600dp
layout-sw720dp
Create also values-folders like
values-sw300dp
values-sw330dp
values-sw480dp
values-sw600dp
values-sw720dp