Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scrollResponderZoomTo does not work in Android #9830

Closed
shaneosullivan opened this issue Sep 9, 2016 · 12 comments
Closed

scrollResponderZoomTo does not work in Android #9830

shaneosullivan opened this issue Sep 9, 2016 · 12 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@shaneosullivan
Copy link
Contributor

Issue Description

ScrollResponder.scrollResponderZoomTo only works in iOS. This prevents the programmatic control of zoom in ScrollViews.

It contains the code
if (Platform.OS === 'android') {
invariant('zoomToRect is not implemented');
}

Steps to Reproduce / Code Snippets

Simply call the scrollResponderZoomTo on any ScrollView component, e.g.

this.refs.scrollView.scrollResponderZoomTo({
x: 1,
y: 1,
width: 400,
height: 800,
animated: false,
});

Expected Results

It should zoom to the desired rectangle. However it throws an error with an invariant.

Additional Information

  • React Native version: 0.3.2
  • Platform(s) (iOS, Android, or both?): Android
  • Operating System (macOS, Linux, or Windows?): MacOS, Linux & Windows
@jmurzy
Copy link
Contributor

jmurzy commented Oct 8, 2016

This is a limitation of the Android ScrollView. It doesn't have built-in support for zooming or multi-directional scrolling.

@shaneosullivan
Copy link
Contributor Author

Understood. However from the point of view of Arab, this is a problem that
we should track and fix at some point. Not being able to zoom images is a
huge limitation of the framework.

If an additional native component is needed, we should track that work

On Sunday, October 9, 2016, Jake Murzy notifications@github.com wrote:

This is a limitation of the Android ScrollView. It doesn't have built-in
support for zooming or multi-directional scrolling.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#9830 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADA4v9cueMM57GpMldwUtDWygwRSWS1ks5qyCkRgaJpZM4J5j1N
.

Blog: shaneosullivan.wordpress.com
Twitter: twitter.com/chofter

@jmurzy
Copy link
Contributor

jmurzy commented Oct 10, 2016

Agreed. I'm currently working on reimplementing UIScrollView in JavaScript. IMO this is ultimately the best way to achieve feature parity between native platforms. l will update here when if I make noteworthy progress.

🍺

@lacker
Copy link
Contributor

lacker commented Feb 9, 2017

This is definitely a good feature to have. We are trying to keep github issues focused on bug reports, though, and use Product Pains for feature requests, so I think we should close this issue. It's also somewhat stale and it's unclear at least to me how one would plausibly solve it (I suspect ScrollView in JS will have a lot of tradeoffs). But if someone had a PR for this that would be cool!

@lacker lacker closed this as completed Feb 9, 2017
@toearth
Copy link

toearth commented May 10, 2018

@jmurzy Do you reimplemt the new one ?

@ahmetabdi
Copy link

+1

2 similar comments
@yuunusdurmus
Copy link

+1

@ugurcanomur
Copy link

+1

@ismailbayram
Copy link

+1 please help us! that is a huge PROBLEM!!!!

@escalepion
Copy link

+1

1 similar comment
@mertsalik
Copy link

+1

@eneskaplan
Copy link

+1 !

@facebook facebook locked as resolved and limited conversation to collaborators Jul 19, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests