Screeen hieght and width (Urgent)

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Screeen hieght and width (Urgent)

Postby zeeshan » Wed Mar 26, 2008 12:10 pm

What is the screen width and height of emulator i want to know in urgent please can any body help me ?
zeeshan
Experienced Developer
Experienced Developer
 
Posts: 68
Joined: Mon Mar 03, 2008 6:10 am

Top

Postby soniya » Thu Mar 27, 2008 6:57 am

u can use DisplayMetrics for get Screen width and height ...

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. DisplayMetrics dm = new DisplayMetrics();
  2.  
  3.                 getWindowManager().getDefaultDisplay().getMetrics(dm);
  4.  
  5.                 int Width = dm.widthPixels;
  6.  
  7.                 int Height= dm.heightPixels;
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
soniya
Senior Developer
Senior Developer
 
Posts: 111
Joined: Mon Jan 14, 2008 1:52 pm
Location: india

Top

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests