Comments (5)
上拉加载使用的是单独的viewtype方式做的,现在基于recyclerview的上拉加载都是基于这种方式实现的,我的印象中是rv是按照viewtype来复用的,但是上拉加载是一个单独的viewtype,所以不存在复用的情况。
你可以放心的,这种方式基本不用考虑内存的开销。
from byrecyclerview.
我的意思是他上拉加载后生成的每一个itemView好像都是一个全新的对象,这个是不是就有点奇怪了,我用的是你的demo中 StickyRvCoordinatorActivity,每个itemView里面都有一个mediaplayer,然后每次都生成一个新的对象,快速滑动的时候mediaplayer播放会出错
from byrecyclerview.
我觉得 你不加加载更多
的功能,就用原生的RV,也是这样的情况。
这个和列表里加"倒计时功能"同理,我觉得你应该新建一个HashMap用来存储mediaplayer,存 position和mediaplayer,如果position没有就新建一个mediaplayer然后存起来;有position就直接取mediaplayer使用,然后再离开页面的时候销毁HashMap,你也可以限制HashMap的大小保障内存开销。
from byrecyclerview.
而且我觉得你应该还要记录item播放视频对应的进度,等再次滑到那个item时直接定位到那个进度
from byrecyclerview.
解决了吗?还有问题再提哈
from byrecyclerview.
Related Issues (20)
- 仓库下载不到资源
- item 悬浮置顶加入下拉刷新 ,悬浮错位! HOT 2
- 计划新增 侧滑和拖拽功能 HOT 3
- 计划新增 ViewBinding使用示例 HOT 1
- 计划 同步代码到gitee
- 怎样在xml绑定数据 HOT 1
- 添加headerview后,主体内容却不显示了 HOT 2
- 发现一个bug HOT 8
- setStackFromEnd = true 下拉刷新有点不正常 HOT 14
- 可以增加一个treeview的的适配器吗 HOT 4
- can show the second floor demo? HOT 1
- 希望增加一个功能 HOT 4
- 大佬,何时增加多级列表 HOT 2
- 列表在吸顶状态,然后detach再重新attach时,出现2个吸顶布局 HOT 11
- Demo中可以增加字母索引的案例吗 HOT 2
- 报废或附加的视图可能无法回收
- 大牛真厉害 HOT 1
- 给大牛ByRecyclerView提建议 HOT 8
- 嵌套和多级列表问题
- 多类型不能使用databing吗? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from byrecyclerview.