DisplayMetrics dis = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dis);
Log.i("width = ",""+ (width = dis.widthPixels));
Log.i("height = ",""+ (height = dis.heightPixels));
On Tue, Apr 13, 2010 at 3:35 AM, Bob <[email protected]> wrote:
> Hi,
> I need to know how many pixels wide and tall the screen is. I know
> that there are a bunch of different localization folders that I could
> make for different views but I just need to know, programmatically,
> how many pixels are on the screen so I can do some drawing. How can I
> detect this?
>
> Thanks,
> Bob
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>
--
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