I am new to Android, but not to software development. This could be considered a beginner level question, but it is a bit involved, so I didn't put it on stack overflow.
I've written a test app, testing out all the technologies I need to use in my first real app, found out basically how Android works and so on, all seems fine. However, the real app has a rather complex layout in one activity: it will need to have 2 text areas, 22 buttons of varying sizes and a graphic area - never mind why! The topography of all this and size of the various elements will have to be determined depending on the X/Y size of the display are, whether it is portrait or landscape, and so on. I cannot find an already existing ViewGroup type that will allow me to define all this sufficiently well in a layout, so I conclude it will have to be done by code at the point the activity finds out how much space it has to play with. I am in a quandary about how to achieve this. One way would be to just define one view, filling the entire available area, and then in its size setting override, calculate everything, working out rectangular areas for all elements and just handle everything in the one view. I know this would work OK as that is what is done in the Windows platform it is being ported from. However, I cannot help feeling it would be more modular and rather neater if it was done with 2 TextViews, 22 Buttons and 1 special purpose view I'll create myself. What I cannot figure out is how to go about this latter approach. I can create all the views in the activity's onCreate(), but then what do I do with them? How do I find out how much screen real estate is there? I can find out about the full screen, but do I necessarily get all of it? It seems not given the 3.0 replacement for the menu button. Am I right in thinking that actually the way I have to do this is create my own derivation of ViewGroup, and then get that to do all the laying out of the elements? Comments appreciated. (I really do need those elements on the screen, so suggestions that I might want to rethink the whole app, what it does and how it does it are unnecessary). -- 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

