First you need to get the WindowManager by :

WindowManager wm = getSystemService(Context.WINDOW_SERVICE);

Next use the method to retrieve a Display object:

Display d = wm.getDefaultDisplay();

... and finally the resolution:

int height = d.getHeight();
int width = d.getWidth();

Hope that helps.

On 5 Sty, 15:17, Nico <[email protected]> wrote:
> Hi,
> I need to get the screen resolution, how can I get it ?
> Thx.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to