-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
反馈个bug,我用viewpager2,从kotlin-android-extensions改成这个框架报错 #21
Comments
@shenyunhuan 非常感谢你的反馈,我会尽快修复,有两个几个问题咨询一下:
|
1、在一个Tab内,滑动无问题, |
大概理解了你的意思,我写个 demo 试试看 |
你好,我按照你说的,写了一个 demo:
滑动并没有出现问题: demo 体验入口地址: 「第一个 Activity」 -> 「 ViewBinidng示例」 -> 「 在 ViewPager2 中使用」 可以滑动体验一下 代码地址如下所示,如果有时间,辛苦看一下,是否和你的架构一致 Binding/app/src/main/java/com/hi/dhl/demo/binding/viewpager2/ViewPager2Activity.kt Lines 21 to 87 in 49f1375
|
先是报错 FragmentManager is already executing transactions
然后我改了FragmentStateAdapter的条件
报错变成了Fragment no longer exists
但是FragmentStateAdapter saveState是final方法 和viewpager2 也是final class
所以我还原代码kotlin-android-extensions的写法就没有报错了
我应用的UI是下面三个tab,一个tab用viewpager2包两个 Fragment
在tab上切来切去就报错
The text was updated successfully, but these errors were encountered: