On Fri, Sep 16, 2011 at 3:47 PM, John Goche <[email protected]>wrote:

> <!-- ListView (grid_items) -->
>   <LinearLayout android:id="@+id/layout"
>     android:layout_width="wrap_content"
> android:layout_height="fill_parent">
>     <ListView android:layout_weight="1" android:id="@+id/listview"
>       android:layout_width="fill_parent"
> android:layout_height="fill_parent"></ListView>
>   </LinearLayout>
>

A) If you tell the "layout" LinearLayout to fill it's parent vertically, it
will do exactly that, pushing the rest out of the way.
B) Putting a ListView inside a LinearLayout for no other reason than to
contain it is redundant and wasteful.

Remove the "layout" LinearLayout and set the ListView's height to
wrap_content, leaving it's weight to 1 so it takes all available space after
the other items are laid out.

Also have a looky-loo at ListView setFooterView() and setHeaderView() -
might make sense in your scenario.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to