These tutorials will help you
1 - Text Tutorial Android Supporting multiple screens
2 - Video Tutorial Multiple Screens
For Small explanation!
Yes you can do it.
Supporting Multiple Screens
res/layout/my_layout.xml // layout for normal screen size ("default")
res/layout-small/my_layout.xml // layout for small screen size
res/layout-large/my_layout.xml // layout for large screen size
res/layout-xlarge/my_layout.xml // layout for extra large screen size
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation
res/drawable-mdpi/my_icon.png // bitmap for medium density
res/drawable-hdpi/my_icon.png // bitmap for high density
res/drawable-xhdpi/my_icon.png
@Henry Thompson
and then u need to create a main.xml for each one with the same name.
By placing the layout XML files in different folders you can get Android to load the correct one depending on the screen density. For example, if you layout is called "main.xml":
Supporting Different Screen Sizes
Display display = getWindowManager().getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
For WVGA Screen , i can load layout and it can be changed according to
screen
if (width == 480 && height == 800)
{
setContentView(R.layout.main); // load different layout as per screen size or specifications
}
3rd Update - Answer to How to find its ldpi , mdpi etc
Already answered here @solution ldpi mdpi