Ah, of course, sorry. I was almost there, just had to substitute
'clazz' for 'dm'!

Many thanks Mark.

On Dec 17, 1:11 pm, Mark Murphy <[email protected]> wrote:
> On Fri, Dec 17, 2010 at 8:06 AM, Neilz <[email protected]> wrote:
> > Er, surely in my code snippet, the parameter passed to get *is* my
> > display metrics instance?
>
> No, get(clazz) is passing the DisplayMetrics class. clazz is of type
> Class, as you can see in your preceding line.
>
> The DisplayMetrics class has the instructions for getting an instance
> of the DisplayMetrics class:
>
> http://developer.android.com/reference/android/util/DisplayMetrics.html
>
> DisplayMetrics metrics = new DisplayMetrics();
> getWindowManager().getDefaultDisplay().getMetrics(metrics);
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!

-- 
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