开发者

How to display "More" list item in ListView?

I want to display a list item that says "More" at the end of 开发者_开发问答my ListView. Clicking on this list-item will perform some action. How can I create this "more" list item?


I don't know about the "Clicking on this list-item will perform some action" part. The typical pattern is that once the user scrolls to the bottom, new material is loaded automatically. Some people do that by detecting the scroll. I do it by putting in a "More" placeholder and detecting when that is used. Here is a component that implements this pattern.


Just add another value to your arrayadapter (or any other adapter), you might be using.set the text to 'more' . Suppose you have n items in the list then handle the (n+1)th postion click and do your stuff.


You can add a footer to your listview...

Did you check this post out?

Android ListView Footer View not being placed on the bottom of the screen

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜