luckybilly / luckybilly/SmartSwipe

和ViewPager2使用不生效

Open
#74 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
2.1k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

问题描述

请描述您遇到的问题

  • 预期行为:在含有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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied SmartSwipe.wrap configuration in an Android Activity containing ViewPager2, using the reported Huawei Mate9 and Redmi Note8 behaviors as references. Done means a left swipe from the first page reliably exits across the affected devices, but the issue does not name source files or tests to guide implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.