Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[ImageButton] ImageButton's VisualState inside a ScrollView doesn't work properly #4981

Open
syedhoque89 opened this issue Jan 14, 2019 · 1 comment
Labels
a/imagebutton e/4 🕓 4 help wanted We welcome community contributions to any issue, but these might be a good place to start! inactive Issue is older than 6 months and needs to be retested p/Android p/iOS 🍎 t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!

Comments

@syedhoque89
Copy link

syedhoque89 commented Jan 14, 2019

Description

I'm setting ImageButton VisualState following the example set here: https://blog.xamarin.com/xamarin-forms-3-4-0-say-hello-to-imagebutton

However, VisualState inside a ScrollView or ListView doesn't behave correctly.

iOS:

  1. Inside a ListView/ScrollView the VisualState doesn't change on click/tap. However, If you tap and hold the VisualState does change.
  2. If the ImageButton is inside a ListView/ScrollView and you tap and scroll (after VisualState change has taken place, please see the attached screengrab) the state gets stuck to smaller scale and doesn't revert back.
  3. Outside any ListView or ScrollView the ImageButton state changes on tap as expected contrary to no. 1 above. However, still gets stuck on smaller scale if you tap, wait for state change and then swipe/scroll.

Android:

  1. If the ImageButton is inside a ListView/ScrollView and you tap and scroll/swipe (after VisualState change has taken place, please see the attached screengrab) the state gets stuck to smaller scale and doesn't revert back.

Possible related issue here: #4960

Steps to Reproduce

  1. Extract and run the repro attached
  2. Click on ImageButton
  3. Click on ImageButton and Swipe/Scroll

Expected Behavior

  1. On tap VIsualState should change and scale down and revert
  2. On tap and swipe ImageButton VisualState should not get stuck.

Actual Behavior

  1. On iOS the VisualState doesn't scale down unless you tap and hold (inside a ListView/ScrollView)
  2. On tap and swipe/scroll VisualState gets stuck on the scaled down state (inside a ListView/ScrollView)

Basic Information

  • Version with issue: XF 3.4 latest
  • Last known good version: Unknown
  • IDE: Visual Studio Community 2017 for Mac Version 7.7.2 (build 21)
  • Platform Target Frameworks:
    • iOS: 12.1
    • Android: Android 8.1 (API 27)
    • UWP: N/A
  • Android Support Library Version: 27.02.1
  • Nuget Packages: Default (File => New Project).
  • Affected Devices: Reproduced using iPhone 6, 6S+, Galaxy S6 Edge, Note 9, and both Simulator and Emulator

Screenshots

https://drive.google.com/file/d/11mr_NDzEHERtrxTVW-Ox-3egtlyEJNFo/view?usp=sharing

Reproduction Link

ImageButtonRepro.zip

@rmarinho rmarinho added the e/4 🕓 4 label Jan 18, 2019
@samhouts samhouts added inactive Issue is older than 6 months and needs to be retested help wanted We welcome community contributions to any issue, but these might be a good place to start! up-for-grabs We welcome community contributions to any issue, but these might be a good place to start! labels Jul 14, 2019
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@askariya
Copy link

I know it's been years but did you ever find a workaround for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/imagebutton e/4 🕓 4 help wanted We welcome community contributions to any issue, but these might be a good place to start! inactive Issue is older than 6 months and needs to be retested p/Android p/iOS 🍎 t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects
None yet
Development

No branches or pull requests

4 participants