26.12.2010 21:11, Brill Pappin пишет:
Thanks Kostya,
I am actually using the various methods of providing different dimens
to different devices, however the problem is that there are so many
that I'm having trouble getting things right for all of them. What I
need to be able to do is ask the device what it thinks.
Presumably that will resolve some of the edge cases where the user
almost has a good product but just needs a little tweak.
I know what you mean - same thing with widgets. A widget that takes up
one cell is simple enough, but if there are several sizes (1x1, 2x1,
3x1) and you want them to line up nicely, in portrait and landscape
modes, that adds a lot of complexity.
I did look in the Android source for some cluse, but it seems to use a
private style sheet, that or I don't understand how it works well
enough, which is also likely :)
I just had a quick look at LatinIME:
http://android.git.kernel.org/?p=platform/packages/inputmethods/LatinIME.git;a=tree;f=java/res;h=4aa09f391807cb18015472862776b1efe930623d;hb=refs/heads/gingerbread
This uses styles.xml with values separated into dimens.xml. Curiously
enough, there is only one alternate dimens.xml - for landscape
orientation. Text sizes for alpha keys and labels ("Done", etc.) appear
to come from this stylesheet.
Also of note: some values are specified in dips, some in inches, and
some in sp units.
- Brill Pappin
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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 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