That's strange, I don't see why that wouldn't work. This is the code in 1.5:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/view/ViewGroup.java;h=e686d1c20bd21eaa050ff3bf9187b549ee7b1355;hb=refs/heads/cupcake-release#l3319 Which boils down to: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/content/res/TypedArray.java;h=3a32c0312202532c32bb79c0801121c4fc09b70c;hb=refs/heads/cupcake-release#l426 That seems basically like the code we have today, so should work the same way. The only way I can imagine someone breaking this is if they change the implementation of those two functions... and if someone does that, I hate them. >:| For what it's worth, the whole "@dimen" thing is very intrinsic to the resource system; it is not really a special "@dimen", but the "@" syntax that generally says to get the value from the resource indicated. The only thing that knows anything about "dimen" at all just aapt to help you build resources in a standard way. So the simple act of retrieving a TypedArray will already take care of resolving resource references to their final value, and does this independently of what specific types there are. You can't break things at this level without breaking all kinds of stuff. Which is all to say, I have no idea why that would break. :/ On Mon, Jan 17, 2011 at 10:26 AM, Kostya Vasilyev <kmans...@gmail.com>wrote: > No, I mean defining a value like this: > > <dimen name="some_value">140dp</dimen> > > and then using it like this: > > <RealtiveLayout ..... android:layout_width="@dimen/some_value"> > > I used this for widget sizing, and had a default fallback dimens.xml in > "res/values" (without alternate qualifiers). > > Based on my user's feedback, this produced zero-sized (invisible) widget > layouts. > > Was this supposed to work for 1.5? > > -- Kostya > > 2011/1/17 Dianne Hackborn <hack...@android.com> > > By @dimens do you mean the "dp" unit in layouts? >> >> If there is something not working on a device, we'd like to know about it >> because it is not compatible with the CDD which is a requirement for having >> Market. >> >> >> On Mon, Jan 17, 2011 at 9:40 AM, Kostya Vasilyev <kmans...@gmail.com>wrote: >> >>> I'm using @dimens quite a bit, not because I have different values for >>> different screen sizes / resolutions, but because it lets me tweak my >>> layouts more easily during development. >>> >>> After seeing them not work on a certain 1.5 device (even though that's >>> part of API level 1), I've decided that the extra 5% is not worth the >>> trouble. >>> >>> -- Kostya >>> >>> 2011/1/17 String <sterling.ud...@googlemail.com> >>> >>> On Monday, January 17, 2011 3:27:02 PM UTC, Kostya Vasilyev wrote: >>>> >>>> For now, both my apps continue to support 1.5, but a new project I'm >>>>> working on will only run on 1.6+ - because that's the first version with >>>>> multi-resolution support, and one really needs that these days. >>>>> >>>> >>>> What are you doing with multi-resolution that's problematic? I have >>>> quite a bit of multi-resolution code, and so far the vast majority has >>>> degraded pretty gracefully on 1.5. >>>> >>>> String >>>> -- >>>> 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+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@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+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> >>> For more options, visit this group at >>> http://groups.google.com/group/android-developers?hl=en >>> >> >> >> >> -- >> Dianne Hackborn >> Android framework engineer >> hack...@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+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@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+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en