Actually, it's even simpler. Since it's a static final, the value is built into your apk-file at compile time, so you can use SCREENLAYOUT_SIZE_XLARGE no matter what version the device is running. You can try this for instance using an emulator with Android 1.6 and an app compiled against Android 2.3 with minSdkVersion="4" and targetSdkVersion="9".
On 11 Maj, 16:47, Emanuel Moecklin <[email protected]> wrote: > You are right, because the "variable" is static final I could just use > its value 4. > If it weren't static final I wouldn't do that even if the docs say > Constant Value: 4 (0x00000004). > > On May 11, 9:54 am, Kostya Vasilyev <[email protected]> wrote: > > > > > > > > > 11.05.2011 17:24,EmanuelMoecklinпишет: > > > > SCREENLAYOUT_SIZE_XLARGE unfortunately isn't supported before > > > Gingerbread so it's either using reflection or my approach (maybe > > > there are other solutions) to_really_ solve Droid's problem (I agree > > > that the nosensor approach is not the right one). > > > Why would you need reflection for a simple integer constant? > > > You can just define your own, the value is 4. > > > Besides, it's defined as a "static final" and so is inlined by the > > compiler even if referenced by its symbolic name. > > > -- Kostya > > > -- > > Kostya Vasilyev --http://kmansoft.wordpress.com -- 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

