Thanks for your help. I've looked into this a bit more and it seems that, for what I want to do, its enough just to define another layout in the layout-land folder.
Its not perfect, because I'm currently assuming just two possible screen widths (320 and 480) and so setting the maxWidth accordingly for those two scenarios. This might need a little reworking with the new support of multiple screen-sizes in 1.6, but it will do for now... On Oct 15, 1:50 pm, String <[email protected]> wrote: > On Oct 15, 5:32 am, westmeadboy <[email protected]> wrote: > > > For example, in the layout xml, is it possible to get a handle on the > > screen width and apply some kind of arithmetic to it (e.g. > > maxWidth="(60 * @screenWidth) / 100px") > > AFAIK, no calculation is possible in the XML. I'd recommend doing this > in your activity's Java code instead, using the TextView.setWidth() > method. > > > Also would this approach mean the maxWidth would be automatically > > recalculated on orientation changes? > > If you do it in Java, you can handle this yourself, as the activity > gets recreated when the orientation changes. > > String --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

