luckybilly / SmartSwipe

An android library to make swipe more easier and more powerful. Android各种侧滑,有这一个就够了

Home Page:https://juejin.im/post/5d3fdc3af265da03c02bdbde

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

和ViewPager2使用不生效

jianjunxiao opened this issue · comments

问题描述

请描述您遇到的问题

  • 预期行为:在含有ViewPager2的Activity中使用时,在第一个page左滑能正常退出

  • 实际行为:在含有ViewPager2的Activity中使用时,在第一个page左滑时在部分机型不生效,我这里测试到一个华为mate9手机就不行,在另一个红米note8手机上可以在第一页左滑退出,但是互动一瞬间不是很灵敏。

出问题的代码

   SmartSwipe.wrap(this)
            .removeAllConsumers()
            .addConsumer(ActivitySlidingBackConsumer(this))
            .setSwipeDistanceCalculator(ScaledCalculator(1f))
            .enableLeft()

当前使用的SmartSwipe版本号:

implementation 'com.billy.android:smart-swipe:1.1.2'
implementation 'com.billy.android:smart-swipe-x:1.1.0'

如何复现?(如果能在demo中复现将有利于作者尽快修复问题)

截图或gif

commented

你好,这问题,你解决了吗?