Re: [android-developers] How to detect XHDPI on Froyo?
Just build your app against the latest APIs you want to use, and make sure you don't use them when running on older versions of the platform.
This is what the support lib does, for example.
For constants like this, it is even easier, because a "static final int" doesn't get put in your app as a reference to the symbol, but the actual value is compiled in. So you can use that symbol and still run on older versions of the platform without checking and not get a symbol exception when the code is executed.
--
Dianne Hackborn
Android framework engineer
hackbod@android.com
Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.
-- On Sun, May 6, 2012 at 2:41 PM, Andreas Bratfisch <duskman72@googlemail.com> wrote:
Hi Dianne,thank you for answering my question.maybe i have written my problem in a wrong way^^what i want to do is as i wrote to be compatible to Froyo – that means, i have some parts in my codethat checks for XHDPI devices (i know, its up to Gingerbread) but i cant remove that code ... but, thesefunctions arent supported in Froyo – so, what can i do to support both Froyo and xlarge devices?I dont want to create a second app to be compatible :(Btw:can i use code such asboolean isScreenLarge = mDisplayMetrics.densityDpi >= DisplayMetrics.DENSITY_HIGH... maybe this can solve my problem because DENSITY_HIGH is supported.this are constant hex values that cant be compared to greater or less as i think, or does that works ???Thanks for help ;)From: Dianne HackbornSent: Sunday, May 06, 2012 10:21 PMSubject: Re: [android-developers] How to detect XHDPI on Froyo?xhdpi wasn't added until GB. It doesn't exist on Froyo, so there is no need to check for it.Also saying that you are checking density to solve problems on large devices is... wrong. Density is screen pixel density; it has nothing to do with device/screen *size*.
Hi,
i want to make my app compatible to Froyo, i can downgrade most of my
code but have
no idea on how to detect XHDPI screens. Currently i have things in my
code like
"if( mDisplayDensity == DisplayMetrics.DENSITY_XHIGH)" to solve some
problems on large
devices - in the Froyo version this isnt possible because its not
supported.
Thanks for a tipp to solve that :)
Greets from Munich
Andymailto:android-developers%2Bunsubscribe@googlegroups.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
--
Dianne Hackborn
Android framework engineer
hackbod@android.com
Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Dianne Hackborn
Android framework engineer
hackbod@android.com
Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home