{ "id": "61185", "key": "TIMOB-553", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:53:29.000+0000", "created": "2011-04-15T02:31:42.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "event", "feature", "webview" ], "versions": [], "issuelinks": [ { "id": "15756", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "62649", "key": "TIMOB-2017", "fields": { "summary": "Android: WebView No Longer Fires Click Event", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-03-14T14:05:40.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": "{html}
It looks webviews in android only receive 'load' events.
\nbeforeload, click and other events in the api docs do not\nworks.
There is a beforeload event in iPhone. There may be others.
I want to open pdf on webview .Pls suggest.
\nI am getting Error 401 while loading url on webview android.
@krati this is not the support forum. Please do not post\nquestions here. Go to Q&A\non the developer website.
This will be in 1.5
(from [0b0328c15cd4fde434002b721b94e55a1682ccb2])\n[#553\nstatus:fixed-in-qa] Support beforeload event. \nhttp://github.com/appcelerator/titanium_mobile/commit/0b0328c15cd4f...
Sample test app.js. You will see notification windows showing\nbeforeload (and load, after a three second delay after the page has\nloaded -- so the notifications don't run into each other.)
\n\nvar notification = Ti.UI.createNotification({\n duration: Ti.UI.NOTIFICATION_DURATION_LONG\n \n});\nfunction showStatus(text)\n{\n notification.hide();\n notification.message = text;\n notification.show();\n}\n\nTitanium.UI.setBackgroundColor('#000');\nvar win = Titanium.UI.createWindow({ \n title:'Test',\n backgroundColor:'#fff',\n exitOnClose: true\n});\n\nvar wv = Ti.UI.createWebView({top:50});\nwv.url = \"http://www.google.com\";\nwv.addEventListener('click', function() {\n showStatus(\"webview clicked\");\n});\nwin.add(wv);\n\nvar topbar = Ti.UI.createView({\n top:0, left: 0, right: 0, height: 45,\n backgroundColor: 'blue'\n});\n\nvar backButton = Ti.UI.createButton({\n left: 10, top: 0, height: 45, width: 100,\n title: 'Back', enabled: false\n});\nbackButton.addEventListener('click', function(){\n wv.goBack();\n});\n\nvar reloadButton = Ti.UI.createButton({\n left: 115, top: 0, height:45, width: 100,\n title: 'Reload'\n});\nreloadButton.addEventListener('click', function() {\n wv.reload();\n});\n\nwv.addEventListener('load', function(e) {\n backButton.enabled = wv.canGoBack();\n setTimeout(function() {showStatus(\"page loaded: \" + e.url);}, 3000);\n});\n\n\nwv.addEventListener('beforeload', function(e) {\n backButton.enabled = wv.canGoBack();\n showStatus(\"page beforeload: \" + e.url);\n});\n\ntopbar.add(backButton);\ntopbar.add(reloadButton);\nwin.add(topbar);\nwin.open();
\n
1.5.0.02c2c264 g1 and 2.2. sim