开发者

Button underneath a ListView

My problem is similar to what this person has posted: http://groups.google.com/group/android-developers/browse_thread/thread/216839d1c45cefa9/a1b9517d2064726b?show_docid=a1b9517d2开发者_如何学C064726b

That is, my button disappears when the listview grows too large for the screen.

However, the solution here is to anchor the button to the bottom of the screen. I don't want this, rather I want the button to stay right underneath the listview, regardless of how many rows it contains.

How can I achieve this? I have tried using ListView::addFooterView before I call setListAdapter, however when I do, then the call to setListAdapter just crashes! I have also tried to use a 'ScrollView' around my RelativeLayout, however this does not work properly either :(


Use listView.addFooterView(button);

http://developer.android.com/reference/android/widget/ListView.html#addFooterView%28android.view.View%29

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜