Comments (6)
@PascalTang 你要获取非实际data的position吗?
外部:banner.getViewPager2().getCurrentItem()
adapter内部: holder.getAdapterPosition()
获取真实位置:banner.getCurrentPager()
你看看是否满足你。
from banner.
ok 這個可以
另外問一個
如果我想add view進去
但在觸發OnPageChangeCallback時
會比convert
導致內部的view根本還沒創建完
有什麼好解法嗎
from banner.
我希望的是 有同一個view 能在viewpager2裡面 搬來搬去
然後我能透過banner 取得current view
from banner.
@PascalTang @PascalTang 尴尬了 我不是很懂 具体点呗
from banner.
HolderRestLoader 你看看这个接口
from banner.
就是我有個播放器
但我希望所有的item view 共用同一個播放器的實體
我暫時用
val recycle = banner.viewPager2.getChildAt(0) as RecyclerView
val itemView = recycle.layoutManager?.findViewByPosition(realPosition)as ConstraintLayout?
itemView add/remove
暫時解掉了
感謝
from banner.
Related Issues (20)
- 请求一屏5页怎么实现 HOT 1
- recyclerview 头部使用banner, banner 那个item 滑出屏幕,会卡在两个切换的item 中间
- CoordinatorLayout+AppbarLayout+NestedScrollView滑动冲突 只会滑动下面的布局 appbarLayout不会跟着滑动 HOT 1
- 1.0.3在debug版本下正常,在release版本上不正常
- 请问混淆有吗? HOT 1
- 一屏三个半,然后滑动,将出现空白 HOT 6
- 能不能banner与指示器分离,不要包含在图片里面 HOT 2
- 怎么设置不无限轮播 HOT 1
- 混淆问题
- 混淆后指示器不动? HOT 1
- CoordinatorLayout AppBarLayout中嵌套RecyclerView,作为RecyclerView的item时,setCurrentItem(item, false)后,再次setCurrentItem(item)时,动画会滚动多次 HOT 5
- 如何设置当前页的效果 HOT 5
- indicator 要設置在veiwpager之外 有辦法解決嗎? HOT 4
- 滑動到最後一頁後,右滑不要回到第一頁 有停止方法嗎? HOT 6
- 我的banner无法一直无限滑动 HOT 5
- Proguard後Banner無法無限滑動, Indicator也不會動 HOT 2
- demo里FragmentStateAdapterActivity 的banner看不到内容 HOT 8
- 支持视频,gif吗?
- debug正常,而release打包异常 HOT 3
- 大佬, 可以扩展一下, 大于多少条数据才循环吗? 现在2条数据就会循环了, 有需求是3条数据才允许循环 HOT 2
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 banner.