views:

104

answers:

1

hi, i am facing problem regarding automatic expansion of list view.. 1) i had separate xml file for each list item . i.e inflated in efficient adaptor, list element is also using selector or highlightor file for background change on click.

now in my main xml file view is like this

-LINEAR LAYOUT - VERTICAL (MAIN) - LINEAR LAYOUT -HORIZONTAL HAVING5 BUTTONS .(CHILD 1) - LINEAR LAYOUT - horizontal having two views as list view.

problem i am facing here is second child having two listview .. only one listview is visible and it is expanding itself to width as fill parent . 1)i had tried to chnage the list item size .. 2)secondly i tried to customize the listview size parameters in main xml ,but it is cutting the list view i.e. showing half data. please help in this regard. Thanks

A: 

I'm a little confused by your description, but I think what you're looking for is this:

For each ListView, set android:layout_width="wrap_content" and android:layout_weight="50", and on the parent LinearLayout set android:weightSum="100" and android:layout_width="fill_parent". (The root LinearLayout should also have a width of "fill_parent".) That should cause each child ListView to take up half of the screen horizontally.

L33tminion