Viewpager and listviews(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 和列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Viewpager 和列表视图
基础教程推荐
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- iOS4 创建后台定时器 2022-01-01
