Hmmm...I am not sure Romain's solutions works in this case. I dumbed down our problem. We are looking at Android to replace a legacy kiosk type of application. The device is not a phone. We have around 40+ different layouts (or Activities in android lingo) that need to show correctly in half dozen resolutions. It is going to be maintenance nightmare if we start creating resolution specific layout files in layout_XXX/ and drawable_XXX/ folders. Everything works great in first release, But it won't be long before the layouts in one resolution going out of sync with their counterparts in other folders.
What would be great is if I can do something like: a) Specify the resolution in the layout xml (say 640x480) b) Build my xml that works in that resolution using whatever units that work for the layout. Then lets say I am showing that layout in 800x480 resolution, the widget engine understands that the layout's native resolution (specified in xml) is different from current system's resolution and start scaling all the measurements, offsets to new resolution. Basically one xml layout is used in multiple resolutions. It works pretty good as long as you don't try 640x480 on 480x640 resolution. This will make it even better if you combine it with layout_XXX/ method. The widget engine picks a match from layout_XXX/ folder and doesn't do any scaling. If there is no match, it defaults to my solution. I understand you can achieve resolution independence with clever way of using layout_width and layout_weight. When you have buttons with drawables on left/right, you start using the padding attributes in px or dip. They don't seem to position correctly when you change resolution. If I have to implement a solution like above, what is the least intrusive way (to the framework) of accomplishing it? Do I need to create my own xml layout inflator and add the translations like above? Or did I go on a tangent? Thanks for answering. Videoguy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

