Aligning separate TableLayouts?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Aligning separate TableLayouts?

Postby simonhaines » Tue Dec 04, 2007 12:16 am

Howdy, has anyone had any success aligning table layouts?

I have a LinearLayout view that contains a TableLayout and a
ViewSwitcher, which in turn contains other TableLayouts. Because the
TableLayouts in the ViewSwitcher are disconnected with the TableLayout
that is the first child of the LinearLayout, the cells are sized
differently. How can I make them uniform?

I'm really only interested in keeping the size of the first cell in
each row the same, as all tables only have two cells per row. I've
tried changing all the tables to vertical LinearLayouts, with each row
being a horizontal LinearLayout and resizing the first child of the
horizontal LinearLayouts, but I've never got setPreferredWidth() or
setLayoutParams() to work in the way I'm guessing they might. Using
layout weights on the horizontal LinearLayouts means I'd be guessing
at the cell sizes, and wasting screen space otherwise.

Does anyone know how I can align the layouts of two separate tables in
the same view? Maybe I'm going about it the wrong way. Any

Posts: 5
Joined: Fri Nov 30, 2007 11:04 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests