I'm developing the UI for an home-automation/sustainability application and wanted to display some data in a graph so I used the custom-view graph class by Arno den Hond. I put the graph in a TableLayout together with some buttons and labels. Unfortunately I encountered a strange problem: as soon as I add the graph into the XML layout file all the widgets which are supposed to be displayed beneath the graph will be ignored.
basically the whole table row beneath the graph will not be displayed. I also put the graph before the three buttons to see what happens and all the widgets beneath the graph will be ignored again and the graph will be stretched to fill the rest of the screen. Only if I change the visibility of the graph (via android:visibility) to "gone" the other widgets will be displayed.
I would hate to put all the buttons over the graph and actually it would be interesting to know what causes this, so I hope somebody could shed some light on the problem.
Then I would think the graph-view handles the measuresize thing in a way that it is always using the entire space left on the screen :-/
In this case you could either try using layout_height or place the graph-view at the bottom of your screen.
column span: simply place something like 'android:layout_span="2"' in your views.
I agree tables are definitely a good way to get a clear layout. What bugs me a bit is that the cell width in each row is influenced by the other rows in the table. So e.g. I want to have three evenly sized buttons in my second row even if I have only two cells in the third row. There's probably a way to do this but I didn't find it yet.