Since you have not posted any code, I will just give you a brief overview of Android layouts and resources.
You need to create several resources for your application. Android has 4 resolutions (ldpi, mdpi, hdpi and xhdpi) and 4 generalized screen sizes (small, medium, large and very large). Thus, you need to make 4 layouts (or 3 if you do not plan to support tablets, since tablets fall into the super-large category) to support screen sizes.
Here is a general guide:
Place the layouts for small, medium, large and extra large in the res / folder as follows:
res/layout/sample_layout.xml // default layout res/layout-small/sample_layout.xml // layout for small screen size res/layout-large/sample_layout.xml // layout for large screen size res/layout-xlarge/sample_layout.xml // layout for extra large screen size
you can also use
res/layout-land/sample_layout.xml for landscape orientation for all screen sizes or you can adjust the landscape orientation for specific screen sizes as res/layout-medium-land/sample_layout.xml
note that all layouts have the same name.
After you have the finished layouts, you also need to take care of the image resolutions.
again in the res / folder add the following images:
res/drawable-ldpi/sample_image.png // low density res/drawable-mdpi/sample_image.png // medium density res/drawable-hdpi/sample_image.png // high density res/drawable-xhdpi/sample_image.png // extra high density
All images have the same name.
general guidelines for image design:
ldpi is 0.75x dimensions of mdpi hdpi is 1.5x dimensions of mdpi xhdpi is 2x dimensinons of mdpi
Typically, I draw mdpi images for a 320x480 screen, and then multiply the sizes according to the rules above to get images for other resolutions.
Android will automatically choose the best combination of layout and image depending on the device. For example, for a medium-sized device with a high resolution, an image with a mask and medium density will be displayed to the user.
Make sure you create emulators for all of these combinations and thoroughly test the application. here are the white papers for more information:
https://developer.android.com/guide/practices/screens_support.html