开发者

Trouble adding footer to ListView

I have a ListView that I'm trying to add a footer to. For some reason, it won't show up. My footer is defined in a separate XML layout called layout_footer.

View v = getLayoutInflater().inflate(R.layout.layout_footer, getListView(), false);
getListView().addFooterView(v);

Here is the code in my ListAct开发者_开发知识库ivity's onCreate method. Please note that it is the last thing I do in onCreate.

I want this item to scroll with the rest of the list and, according to the resources I've found, I believe this is how you do it. Unfortunately, the footer does not show :(

Help would be much appreciated


Apparently if I add the footer before setting the Adapter, it works

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜