Giter VIP home page Giter VIP logo

Comments (6)

zguop avatar zguop commented on May 31, 2024

@PascalTang 你要获取非实际data的position吗?
外部:banner.getViewPager2().getCurrentItem()
adapter内部: holder.getAdapterPosition()
获取真实位置:banner.getCurrentPager()
你看看是否满足你。

from banner.

PascalTang avatar PascalTang commented on May 31, 2024

ok 這個可以
另外問一個
如果我想add view進去
但在觸發OnPageChangeCallback時
會比convert
導致內部的view根本還沒創建完
有什麼好解法嗎

from banner.

PascalTang avatar PascalTang commented on May 31, 2024

我希望的是 有同一個view 能在viewpager2裡面 搬來搬去
然後我能透過banner 取得current view

from banner.

zguop avatar zguop commented on May 31, 2024

@PascalTang @PascalTang 尴尬了 我不是很懂 具体点呗

from banner.

zguop avatar zguop commented on May 31, 2024

HolderRestLoader 你看看这个接口

from banner.

PascalTang avatar PascalTang commented on May 31, 2024

就是我有個播放器
但我希望所有的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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.