Nikola Miljkovic wrote:
> Hello all,
> 
> I am having a problem with ListViews.  After adding a few items to the
> list and it becomes larger than the layout, my cancel button
> disappears.  Scrolling and everything else on the ListView still work
> fine, but it replaces the views I have below it.  Anyone else run into
> this issue?  Am I missing something?

Do not use android:layout_height="wrap_content" with ListView, because
the height is indeterminate for a scrolling list.

Use either:

-- fill_parent
-- a fixed height (e.g., 200px)
-- a fixed height of 0px and a layout_weight of 1, to take up all the
space not use by your button
-- a RelativeLayout, declaring the button first, then adding the
ListView anchored to the parent top and being above the button

There may be other possibilities as well, but one of those four probably
should do it.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android 1.5 Programming Books: http://commonsware.com/books.html

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

Reply via email to