Rushabh Patel
Rushabh Patel

Reputation: 3080

Android multiple screen size support

I have made layouts for the following screens:

2.7' QVGA

3.2' HVGA

5.1' WVGA

3.7' Nexus One

Now I want to make layout screens for 540px X 960 px, 720px X 1280px, 480 X 854, but I can not find any way to make it. What is exactly way to support all the size of phones and tablets?

Upvotes: 0

Views: 1014

Answers (1)

Sathish
Sathish

Reputation: 1475

You can figure out the dimensions of the screen dynamically

Display mDisplay= activity.getWindowManager().getDefaultDisplay();
int width= mDisplay.getWidth();
int Height= mDisplay.getHeight();

The layout can be set using the width and the height obtained using this method.

Upvotes: 1

Related Questions