Viewpager 和列表视图 [英] Viewpager and listviews

查看:17
本文介绍了Viewpager 和列表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的应用中使用 viewpager.

I'm trying to use viewpager in my app.

我想创建 4 个带有列表视图的视图页面,每个列表视图只有数据会改变.当应用启动时,每个页面都会加载自己的数据,但第一次只会显示第一个.

I want to create 4 view pages with listviews and every listview only data will change.When app started every page will load own data but only first one will be shown at the first time.

但我不能这样做.我的片段在每个页面更改时刷新自己的数据,并且所有列表视图始终具有相同的数据.请帮助我解决这个问题.我在 stackoverflow 上问过这个问题,但没有人回答.如果有来源你可以发送它的链接吗?

But i can't do this.My fragment refresh own data every page changes and all the listviews always have same data.Please help me about this.I have asked this at stackoverflow but no one answer it.If there is a source about that can you send its link?

推荐答案

看看这个项目 https://github.com/Shereef/ViewPagerPlusExpandableList (在 eclipse indigo 中导入,或在线查看代码),这是我对我的问题的回答:如何在Android的ViewPager中实现ExpandableList?

Take a look at this project https://github.com/Shereef/ViewPagerPlusExpandableList (import it in eclipse indigo, or take a look at the code online), this was my answer to my question: How to implement an ExpandableList in a ViewPager in Android?

如果它不能完全解决你的问题,应该会对它非常有帮助.

Should be very helpful to your question if it doesn't fully solve it.

这篇关于Viewpager 和列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆