开发者

show more photos

开发者 https://www.devze.com 2022-12-18 13:28 出处:网络
I am getting photos from website and display them in Grid view, but here I do not want display all of them at time,

I am getting photos from website and display them in Grid view, but here I do not want display all of them at time,

  1. I want show only 10 photos and a "more" link below the grid , but i can display "more" link at top, how can I add it at bottom?

  2. when user click on "more" it should display the another 10 开发者_C百科photos only, I need to refresh the grid, how can we refresh the grid?


To display the "more" button on the bottom you need to define a layout. The Android development documentation has a number of examples of layouts that may fit your need.

To update the grid you need to add an onClick listener to your "more" button. Are you using an Adapter to fill your grid? The DataSetObserver is designed to allow you to update the dataset of your grid.

0

精彩评论

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

关注公众号