Search code examples
androidandroid-xml

How can I support various screen sizes of mobile phones for my App in Android that supports only portrait mode?


I am creating an App which which I want to make only for mobile phones and not the tablets. I understand I have to make layout folders and I have made following folders like 1)layout-sw320dp 2)layout-sw480dp 3)layout-sw720dp 4)layout-sw600dp

I want to know if this many are enough to support most of the screens and Could you give me example of each screen size that I should use? So, I can create emulator of that screen size to run and see how it looks in various devices. I am using xml layout.


Solution

  • Best way to support multiple device use given lib below you only have to manage one layout xml file and most of the device will cover using given lib 90% accurately

    for DP use https://github.com/intuit/sdp

    for SP https://github.com/intuit/ssp