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

[Android] Re-introduce pinch to zoom #21303

Closed
paulrouget opened this issue Aug 1, 2018 · 1 comment · Fixed by #21431
Closed

[Android] Re-introduce pinch to zoom #21303

paulrouget opened this issue Aug 1, 2018 · 1 comment · Fixed by #21431
Labels
P-android Android devices
Projects

Comments

@paulrouget
Copy link
Contributor

#20912 followup

We didn't bind the zoom gestures with the new android port.

This should work a lot like scrolling.

First, in ServoView.java, we should use the GestureDetector to detect the gesture. When the gesture starts, we should start looping the same way we do for the flinging gesture (see doFrame).

Then, in libsimpleservo we should add a function to set the zoom level.

@paulrouget paulrouget added the P-android Android devices label Aug 1, 2018
@atouchet atouchet added this to To do in Android MVP via automation Aug 2, 2018
@atouchet
Copy link
Contributor

atouchet commented Aug 2, 2018

Added to the Android MVP project as this is mostly a continuation of #20387.

@paulrouget paulrouget mentioned this issue Aug 16, 2018
3 tasks
@paulrouget paulrouget moved this from To do to In progress in Android MVP Aug 16, 2018
bors-servo pushed a commit that referenced this issue Aug 16, 2018
Pinch to zoom

Implement pinch to zoom.

Also, I added a marker in the toolbar to show if Servo is redrawing or not.

The label switches from "IDLE" to "LOOP" when Servo is looping (at 60FPS) to redraw the page.

Redrawing is necessary for 3 reasons:
- a CSS animation is ongoing
- scrolling
- zooming

This label is, for now, necessary to make sure we are not looping for not reason.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21303 (github issue number if applicable).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21431)
<!-- Reviewable:end -->
Android MVP automation moved this from In progress to Done Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-android Android devices
Projects
Status: Done
Android MVP
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants