I have created a TableLayout
with two rows where first row has one TextView
and second row has two columns, first one has a ListView
and the second one has one EditText
and a Button
each in different rows. I want both rows of equal height (exactly half of the screen) and both of the columns of second row should be of equal width (exactly half of the screen). I Want to build something like this:
How should I proceed ? Which layout I should choose?
I don't think your current solution will work(because of the requirement for equal space(width and height) + the
ListView
presence). One solution is to use nestedweights
(which are bad for performance, but(probably, without knowing what you do) not something that important that will break your app) like in the layout below:Another option to avoid the nested
weights
problem is to use aRelativeLayout
like below(I haven't tested it):The
identical_layout
layout file represents the common layout shared by yourActivities
.