Bug 30798 - [Android] Pinch to zoom doesn't work in android web view
Summary: [Android] Pinch to zoom doesn't work in android web view
Status: RESOLVED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 5.1
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2015-06-04 10:38 UTC by Amalia
Modified: 2015-06-04 13:09 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test Case (48.38 KB, application/zip)
2015-06-04 10:39 UTC, Amalia
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Amalia 2015-06-04 10:38:08 UTC
### Overview: 

When the android app is run on a real device and loads a webpage in a web view, you can't pinch to zoom in or out.



### Steps to reproduce: 

1. Run the attached test case on a real android device. 
2. Try to zoom in or out on the web page.



### Results: 

I can drag the page around, but I can't zoom in or out.



### Expected results: 

Being able to pinch to zoom on the web page.



### Additional information:

Was tested on the following:

HTC One X running Android version 4.1.1
Galaxy Nexus running Android version 4.2.2
Moto G running Android version 4.4.4



### Version information:

=== Xamarin Studio ===

Version 5.9.3 (build 1)
Installation UUID: 1f52eea2-a387-4a2c-96c1-4637c8f8567a
Runtime:
	Mono 4.0.1 ((detached/ed1d3ec)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400010044

=== Apple Developer Tools ===

Xcode 6.3.2 (7718)
Build 6D2105

=== Xamarin.Android ===

Version: 5.1.3.1 (Business Edition)
Android SDK: /Users/amalias/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Not Installed

=== Xamarin.Mac ===

Version: 2.0.1.64 (Business Edition)

=== Xamarin.iOS ===

Version: 8.10.1.64 (Business Edition)
Hash: e6ebd18
Branch: master
Build date: 2015-05-21 21:55:09-0400

=== Build Information ===

Release ID: 509030001
Git revision: 5a524e1726ed103fdd4fe37e0356f2b35466ce9d
Build date: 2015-06-02 16:35:08-04
Xamarin addins: 51957cfbd06be911b212671ad05c2c6221ac90f9

=== Operating System ===

Mac OS X 10.10.3
Darwin amalias.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 1 Amalia 2015-06-04 10:39:38 UTC
Created attachment 11462 [details]
Test Case
Comment 2 Naqeeb 2015-06-04 11:26:12 UTC
I have checked this issue with Test Case given in bug description and able to reproduce successfully. 

I am also not able to zoom in or zoom out web page on Moto X version 5.0, only able to drag page around.

Ide log: https://gist.github.com/saurabh360/eabe7b53e33ee5868091
adb log: https://gist.github.com/saurabh360/c58a432f5af0a2e88d1f

Environment info:
=== Xamarin Studio ===

Version 5.9.4 (build 1)
Installation UUID: 46d4d4b6-9307-4ad8-8136-09022b256dbf
Runtime:
	Mono 4.0.1 ((detached/2a0f19e)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400010056

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.Mac ===

Version: 2.0.2.2 (Enterprise Edition)

=== Xamarin.iOS ===

Version: 8.10.1.66 (Enterprise Edition)
Hash: 14c4f03
Branch: master
Build date: 2015-06-02 01:21:42-0400

=== Xamarin.Android ===

Version: 5.1.4.0 (Enterprise Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Xamarin Android Player ===

Not Installed

=== Build Information ===

Release ID: 509040001
Git revision: a4a0ff65f54cd4533883b8461ba800708853b6f0
Build date: 2015-06-03 06:17:49-04
Xamarin addins: c12ed369b0e05dc5c35c9350fdcbc00a46c0ff99

=== Operating System ===

Mac OS X 10.9.5
Darwin 360-MACMINIs-Mac-mini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 3 Jonathan Pryor 2015-06-04 11:30:44 UTC
...but where does the bug lie?

Please write an equivalent app in Java and see if it behaves the same or differently.
Comment 4 Amalia 2015-06-04 13:01:37 UTC
I wrote an equivalent app in Java using Android Studio, and it behaves the same (no pinch to zoom).

Link to Java test case: https://www.dropbox.com/s/jj9gelg9ajp4qsg/WebViewSampleJava.zip?dl=0
Comment 5 Jonathan Pryor 2015-06-04 13:09:32 UTC
If we behave the same as Java, then it's not a bug.

(It might not be desirable, but the primary purpose of Xamarin.Android is to directly expose the Java API, so as long as we behave ~identically to Java -- which we DO here -- then it's not a bug.)