{ "id": "110631", "key": "AC-2560", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2013-03-20T19:23:45.000+0000", "created": "2013-03-05T17:11:36.000+0000", "labels": [ "android", "heavyweight", "map", "scrollableView" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41:37.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": "14550", "name": "Appcelerator Modules", "description": "Please enter tickets related to Modules here." } ], "description": "h2. Problem\r\n\r\nWhen a window is heavyweight and the mapview is in a scrollableview. It causes a crash. Also, scrolling to the 2nd view (which is suppose to be red) has traces of the mapview overlayed on top.\r\n\r\nh2. Test case\r\n\r\n*Comment out the navBarHidden and windowSoftInputMode and the app will work again*\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar MapModule = require('ti.map');\r\n\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'white',\r\n\tnavBarHidden: true,\r\n\torientationModes: [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT],\r\n\t//windowSoftInputMode: Ti.UI.Android.SOFT_INPUT_ADJUST_PAN\r\n});\r\n\r\nvar scrollableView = Ti.UI.createScrollableView({});\r\n\r\nvar vert = Ti.UI.createScrollView({\r\n\tcontentHeight: 'auto',\r\n\tscrollType: 'vertical',\r\n\tshowVerticalScrollIndicator: true,\r\n\tlayout:'vertical',\r\n\tcanCancelEvents: true,\r\n\twidth: Ti.UI.SIZE,\r\n\tbackgroundColor: 'transparent'\r\n});\r\n\r\nvar opera = MapModule.createAnnotation({\r\n latitude: -33.8569,\r\n longitude: 151.2153,\r\n image: 'SydneyOperaHouse.jpg',\r\n title: 'Sydney Opera House',\r\n subtitle: 'Sydney, New South Wales, Australia'\r\n});\r\n\r\nvar bridge = MapModule.createAnnotation({\r\n latitude: -33.852222,\r\n longitude: 151.210556,\r\n pincolor: MapModule.ANNOTATION_AZURE,\r\n title: 'Sydney Harbour Bridge',\r\n subtitle: 'Port Jackson'\r\n});\r\n\r\nvar random = MapModule.createAnnotation({\r\n latitude: -33.87365,\r\n longitude: 151.20689,\r\n pincolor: MapModule.ANNOTATION_VIOLET,\r\n title: 'Random annotation',\r\n subtitle: 'Look at me!',\r\n draggable: true\r\n});\r\n\r\nvar mapview = MapModule.createView({\r\n\ttop: 200, height: 600,\r\n mapType: MapModule.NORMAL_TYPE,\r\n region: {latitude: -33.87365, longitude: 151.20689, latitudeDelta: 0.1, longitudeDelta: 0.1 },\r\n annotations: [bridge,opera] //< add these annotations upon creation\r\n});\r\n// Add this annotation after creation\r\nmapview.addAnnotation(random);\r\n\r\nscrollableView.views = [mapview, Ti.UI.createView({backgroundColor:'red'})]\r\n\r\nwin.add(scrollableView);\r\n\r\nwin.open();\r\n{code}", "attachment": [ { "id": "36529", "filename": "mapsv2.zip", "author": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-21T17:44:54.000+0000", "size": 1214397, "mimeType": "application/zip" }, { "id": "36532", "filename": "Screen Shot 2013-03-21 at 2.27.22 PM.png", "author": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-21T18:47:07.000+0000", "size": 80979, "mimeType": "image/png" } ], "flagged": false, "summary": "[Android] Google Maps API v2 does not work in a scrollableview", "creator": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "environment": "Android 2.3, Android 4.x, Ti SDK 3.1.0 CI", "comment": { "comments": [ { "id": "243229", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tommy, was this same functionality working on google maps v1? The reason I ask is that the mapview is a type of scrollview and on android it is not suggested or supported (though sometimes works) to have a scrollview within a scrollableview (or scrollview). The android operating system does not support such a nesting of scrollableviews so this is probably why you are seeing the error. This is not a problem with the titanium platform, rather a limitation imposed by the android SDK. Is there a particular reason why you need this functionality or is there any other way to work around this limitation?\nRegards,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-20T19:21:39.000+0000", "updated": "2013-03-20T19:21:39.000+0000" }, { "id": "243409", "author": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "body": "Hi Carter,\n\nThis functionality does work with google maps v1. The reason we are using this is to support the \"scrollable tab\" ui introduced with ICS. Since this functionality is not supported in titanium or available in pre-ICS sdks, we must manually create such a ui for the user. The only solution is to have a scrollable view. It just so happens some of the data scrollable view is a map.\n\nI do not see why scrollview should not be allowed in a scrollable view. The google play store is a perfect example of using such ui.", "updateAuthor": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-21T15:38:41.000+0000", "updated": "2013-03-21T15:38:41.000+0000" }, { "id": "243446", "author": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "body": "I have created and very basic android app with maps in scrollable view (viewpager) and it does not crash or leave behind any artifacts when scrolled. I have attached the sample app.\n\nTherefore this is not an Android bug.", "updateAuthor": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-21T17:44:00.000+0000", "updated": "2013-03-21T17:44:00.000+0000" }, { "id": "243450", "author": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "body": "A quick research on google seems like this is a issue in native android as well in certain cases, however THERE ARE SOLUTIONS.\nhttp://stackoverflow.com/questions/13837697/viewpager-with-google-maps-api-v2-mysterious-black-view", "updateAuthor": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-21T17:48:48.000+0000", "updated": "2013-03-21T17:48:48.000+0000" }, { "id": "243482", "author": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "body": "Also attached an image of the lines of code causing the crash. I would hope at least a fix to the crashing is implemented even if some visual fixes cannot be done.", "updateAuthor": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-21T18:48:43.000+0000", "updated": "2013-03-21T18:48:43.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }