开发者

How can dynamically move scroll bar in gridview

I am using grid view for images,first time i using 16 images display in gridview after i will add another 16 ima开发者_运维百科ges in grid view,now totally 32 images in gridview,ok now i want to move scroll bar last 16 images position in grid view,how can dynamically scroll bar in grid view?,anybody know please give code..

Thanks All


You can use the smoothScrollToPosition method to "smoothly scroll to the specified adapter position."

gridView.smoothScrollToPosition(position);


If you don't want to force your application to use API level 8. So you can support other phones. Use:

https://developer.android.com/reference/android/widget/AdapterView.html#setSelection(int)

gridView.setSelection(position);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜