codenameone / CodenameOne

Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.

Home Page:https://www.codenameone.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImageViewer will block any kind of view to scroll up and down

OmidGhotbi opened this issue · comments

Describe the bug
Adding ImageViewer to any kind of scrollable view will prevent scrolling up and down and the only way is to go outside of imageviewer to be able to scroll.

To Reproduce
Steps to reproduce the behavior:

  1. Create a view
  2. Add a container for imageviewr or use imageviewer directly
  3. Add imageviewr container into the view
  4. Try to scroll up or down when you are touching inside the imageviewer

Expected behavior
Swipe up and down should always scroll the view no matter you are inside imageviewer or any other view component
Like swipe between images and scrolling up and down in Instagram or other applications

  • OS: Same for all OS

  • Device: all devices

Additional context
I need to mention other behavior like .addPointerDraggedListener() not working with imageviewer too, I had to override imageviewer class to be able to get x ,y for pointerDrag, press and release event.
If i setLeadComponent(TopView); scrolling will work perfectly but i will not be able to swipe between images in imageviewer and if .setBlockLead(true); the scrolling up and down will block by imageviewr again.

I solve it with Tabs and ScaleImageLabel, not sure if this is a good way or not, but works as it should.