janheinrichmerker / material-intro

A simple material design app intro with cool animations and a fluent API.
https://jitpack.io/#com.heinrichreimer/material-intro
MIT License
1.74k stars 307 forks source link

A slide can be skipped even if navigation is blocked #306

Open tutaf opened 3 years ago

tutaf commented 3 years ago

A long swipe skips slide that should be unskippable

Reproduce

Steps to reproduce the behavior:

  1. Open demo app (or other app with this library)
  2. Click on "start intro"
  3. Scroll to an unskippable slide (eg. permission request or login)
  4. Long swipe several times
  5. Slide is skipped

Expected behavior

The slide shouldn't be skipped

Stack trace / screenshots

https://user-images.githubusercontent.com/36704220/103523166-28ace080-4e84-11eb-81db-ac8187171aa0.mp4

Device

Asus Zenfone Max Pro M1 (Android 10), demo app v.1.6.1 (same problem in library v.2.0.0) Emulator (Pixel 3a, API 30) library version v.2.0.0

janheinrichmerker commented 3 years ago

This is a glitch which I was not able to fix in ViewPager, as the stock ViewPager API does not support blocking swiping. Thus I had to block swiping using touch listeners. I would be happy to merge a PR in that regard, but I don't have the time to re-implement blocking of sliding. Maybe the library needs to be re-written with ViewPager2... PS: Turns out, GitHub quick-tips just told me you can upload MP4 and MOV files by drag & drop.