I’m creating an application in Android, for which I need to divide the screen into uniform rows and columns to fill the whole screen.
I know how to do this in HTML and WPF (and standard GDI+), but I can’t find a suitable control in Android.
I’m limited to Android 3.2, so I can’t use the GridLayout, which looks like it could do what I want.
Once I have this ‘table/grid’ control, I want be be able to put Buttons, TextViews etc.. into the cells, and indicate whether they span multiple columns or rows.
I’ve been experimenting with the TableLayout control, but I can’t seem to get the columns/rows to be of a uniform size.
I’m also building this grid on the fly at runtime.
Is there any such control which will allow this?
Thanks,
Rich.
I have acheived this by creating a new class deriving from ViewGroup which lays out my ‘Views’ in the correct fashion. This works well, although I’m having some trouble aligning text within the child Views.