{ "id": "78557", "key": "TIMOB-4844", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "12079", "description": "", "name": "Sprint 2011-39", "archived": true, "released": true, "releaseDate": "2011-10-03" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-10-03T07:30:38.000+0000", "created": "2011-07-31T22:50:55.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "module_webview", "qe-testadded" ], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" } ], "issuelinks": [], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-25T08:49:31.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Request that Appcelerator expose the {{setBuiltInZoomControls}} property on WebViews within Android so that zooming functionality can be _disabled_ in the application. Perhaps a property name like {{disableZoom}} might be more appropriate.\r\n\r\nAndroid documentation: http://developer.android.com/reference/android/webkit/WebSettings.html#setBuiltInZoomControls(boolean)", "attachment": [], "flagged": false, "summary": "Enable property for setBuiltInZoomControls in WebViews on Android", "creator": { "name": "matthewcongrove", "key": "matthewcongrove", "displayName": "Matthew Congrove", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "matthewcongrove", "key": "matthewcongrove", "displayName": "Matthew Congrove", "active": true, "timeZone": "America/Chicago" }, "environment": "Titanium SDK 1.7.2\r\nAndroid 2.2", "comment": { "comments": [ { "id": "161880", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "h3.Associated helpdesk ticket:\r\nappc.me/c/APP-864343\r\n\r\nChanging the customer priority to Within release.", "updateAuthor": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-04T12:12:38.000+0000", "updated": "2011-08-04T12:12:38.000+0000" }, { "id": "166854", "author": { "name": "chrisrbailey", "key": "chrisrbailey", "displayName": "Christopher Bailey", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks very much for working on this, it's very important to us (HotelTonight)! I've tested this with continuous build 1.8.0.v20110923102146, but setting enableZoomControls to false doesn't seem to turn off the display of the zoom controls. \r\n\r\nUpon further research, the solution appears to require calling both the native setBuiltInZoomControls, as you do now (in TiUIWebView.java), as well as setSupportZoom. I have added this to the Titanium code, built the SDK, built my app with this new SDK build, and tested it, and it does indeed solve it. I thus hope this addition/change can be part of this fix.\r\n\r\nNote, I found this solution via the following in case it's of interest:\r\nhttp://stackoverflow.com/questions/5125851/enable-disable-zoom-in-android-webview", "updateAuthor": { "name": "chrisrbailey", "key": "chrisrbailey", "displayName": "Christopher Bailey", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-23T18:26:15.000+0000", "updated": "2011-09-23T18:26:15.000+0000" }, { "id": "167256", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I just tried the latest build with my app.js, and it seems to be working. Could you provide an app.js so I can try to reproduce the issue you are having?\r\n\r\nThanks,\r\nAllen", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-28T14:07:18.000+0000", "updated": "2011-09-28T14:07:18.000+0000" }, { "id": "167264", "author": { "name": "chrisrbailey", "key": "chrisrbailey", "displayName": "Christopher Bailey", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I just downloaded the latest continuous build for today, and it's still happening - on some devices. Here's a screenshot:\r\nhttps://skitch.com/chrisrbailey/fh2nb/android-zoom-controls-on-webview\r\n\r\nThis occurs on my HTC Thunderbolt, but not on an Droid X or an LG Optimus:\r\nHTC Thunderbolt: Android 2.2.1, Verizon, Webkit/533.1, screen: 480x800\r\nDroid X: Android 2.2.1, Verizon, screen: 480x854\r\nLG Optimus S: Android 2.2.2, Sprint, screen: 320x480\r\n\r\nTo reproduce this, use a Titanium app that contains a window that has a WebView control. Open that up, ensure a web page loads in the webview, then scroll the webpage. You'll then see the zoom controls appear, again on some devices.\r\n\r\nThe above screenshot was taken on an HTC Thunderbolt, using Titanium build 1.8.0.v20110926132318. As other Android developers have found, this depends on the device, but it seems, it's not enough to just call setBuiltInZoomControls, you also need to call setSupportZoom in order to affect this on all devices (see my prior comment and the Stack Overflow thread).", "updateAuthor": { "name": "chrisrbailey", "key": "chrisrbailey", "displayName": "Christopher Bailey", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-28T14:59:41.000+0000", "updated": "2011-09-28T14:59:41.000+0000" }, { "id": "167333", "author": { "name": "chrisrbailey", "key": "chrisrbailey", "displayName": "Christopher Bailey", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note, I just sent a GitHub pull request with my change for this, that I've tested on the Thunderbolt (and others) and shown to work.\r\nhttps://github.com/appcelerator/titanium_mobile/pull/510", "updateAuthor": { "name": "chrisrbailey", "key": "chrisrbailey", "displayName": "Christopher Bailey", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-29T11:24:36.000+0000", "updated": "2011-09-29T11:24:36.000+0000" }, { "id": "167338", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've added your proposed change with support to change zoomControls after initialization. Thanks for your input.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-29T11:47:47.000+0000", "updated": "2011-09-29T11:47:47.000+0000" }, { "id": "167340", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For testing I used this app.js\r\n\r\n{code}\r\n\r\n\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\nvar overlay = Titanium.UI.createView();\r\n\r\nvar html = '';\r\nhtml += '
take a photo!!
';\r\nhtml +='';\r\nvar webview = Ti.UI.createWebView({\r\n\tbackgroundColor:'#fff',\r\n\thtml:html\r\n});\r\n\r\n\r\noverlay.add(webview);\r\nwebview.setEnableZoomControls(false);\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nwin1.add(overlay);\r\n\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n\r\nvar label1 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 1',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\n// win1.add(label1);\r\n\r\n//\r\n// create controls tab and root window\r\n//\r\nvar win2 = Titanium.UI.createWindow({ \r\n title:'Tab 2',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'KS_nav_ui.png',\r\n title:'Tab 2',\r\n window:win2\r\n});\r\n\r\nvar label2 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 2',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nwin2.add(label2);\r\n\r\n\r\n\r\n//\r\n// add tabs\r\n//\r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n\r\n\r\n// open tab group\r\ntabGroup.open();\r\n{code}\r\n\r\n\r\nThis code should not have zoom controls, since we disabled it. If you enable it with webview.setEnableZoomControls(true), the zoom controls should show up.\r\n\r\n", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-29T11:54:53.000+0000", "updated": "2011-09-29T11:54:53.000+0000" }, { "id": "173823", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing. Verified fix on a Nexus One 2.2.2 with SDK 1.8.0.1.v20111122105459. \r\n\r\nTested with Allen's app. User can zoom in and out, but zoom controls are disabled. If setEnableZoomControls is set to true, zoom controls are enabled.", "updateAuthor": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-22T16:22:42.000+0000", "updated": "2011-11-22T16:22:42.000+0000" }, { "id": "281114", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil test case added.\nPR link:\nhttps://github.com/appcelerator/titanium_mobile/pull/5020", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-25T08:49:31.000+0000", "updated": "2013-11-25T08:49:31.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }