4

我需要在屏幕上显示文本或图像。文本或图像(一个请求总共 10 个)是通过 HttpClient 从我的服务器获取的。当用户向右滑动并到达第 8 张幻灯片时,我需要从服务器获取下一组 10 个文本或图像。这可以使用 ViewPager 吗?

任何示例或指针都会很棒。

4

1 回答 1

0

I don't have a specific example of how to do this but the basic method would be to add new pages to the ViewPager's adapter.

You can add a listener when the page changes which checks which page is currently visible against how many pages are in the adapter to work out when you need to load additional pages from the server.

于 2013-06-05T11:10:15.380 回答