0

I have a requirement that I need to dispaly ListView and at bottom of my List I have to display two buttons (scroll up/down).

Whenever user press on these buttons my list should scroll accordingly.

for this I have used

 if(view == scrollupbtn)
    {
        if(listViewPosition >= 1)
            listView.smoothScrollToPosition(-- listViewPosition);

    }
    else if(view == scrolldownbtn)
    {
        listView.smoothScrollToPosition(++ listViewPosition);

    }

This code able to scroll my listview but I am not able to see list item selector when I press my buttons..

I want to display default list item selector when I press my buttons..

Please let me know what to do for this..

4

1 回答 1

0

如果您需要在列表底部显示视图,可以使用addFooterView方法http://developer.android.com/reference/android/widget/ListView.html#addFooterView(android.view.View,%20java.lang.Object ,%20 布尔值

于 2012-04-14T20:24:33.100 回答