{ "id": "63538", "key": "TIMOB-2906", "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": "11356", "description": "Mobile 1.8.0 M03", "name": "Sprint 2011-24", "archived": true, "released": true, "releaseDate": "2011-06-20" }, { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" }, { "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-11-05T13:39:46.000+0000", "created": "2011-04-15T03:32:34.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "11260", "description": "", "name": "Release 1.6.2", "archived": true, "released": true, "releaseDate": "2011-04-20" } ], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2011-11-05T13:39:46.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": "h1. Problem\r\nModal window's \"top\" is positioned under the Android status bar.\r\n\r\nh2. Sample Code\r\nSee Dawson's comments.\r\n\r\nh2. Note from Customer\r\nFrom a customer (sums it up perfectly):\r\n\r\n\"Hello, when opening a modal window for droid, it appears that\r\nthe 'top' coordinate for the new window is inconsistent when\r\ncompared to iphone. In the kitchen sink example (Windows Standalone\r\n-> Traditional Modal) you can see that the vibrate button is\r\nposition with the top coordinate of 0 being the very top of the\r\nscreen. This means that if you set top to 0 the button will be\r\npartially covered by the status bar. So you need to account for the\r\nstatus bar width when positioning elements. This is not the case\r\nfor iphone as the top '0' coordinate actually references the\r\nstarting point directly below the navigation bar. Obviously the\r\nwork around is simple enough but I think this should probably be\r\nconsidered a bug or feature request? Here's a simple example:\"\r\n\r\nh2. Tested On\r\nBROKEN on Titanium SDK version: 1.7.0 (05/26/11 19:05 70a26b8...)\r\n\r\nh2. Associated Helpdesk Ticket\r\nhttp://appc.me/c/65951", "attachment": [], "flagged": false, "summary": "Android: Modal window is hidden behind status bar", "creator": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "environment": null, "comment": { "comments": [ { "id": "133306", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "I have duplicated this issue with the following code:\n\n{code:javascript}\nvar win = Ti.UI.createWindow({ backgroundColor: '#f00'});\nvar label = Ti.UI.createLabel({\n text: 'Hello, world! I am behind the status bar! :(',\n top: 0, height: 'auto', color: '#fff', fontSize: '18dp'\n});\nwin.add(label);\nwin.open({ modal: true });\n{code}\n\nNote that if you move the \"modal: true\" out of the win.open call, and place it directly in the window properties, this bug will NOT be present. It is only when you have modal: true as an argument to win.open that this shows up.", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-05-09T07:02:11.000+0000", "updated": "2011-05-09T07:02:11.000+0000" }, { "id": "134493", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "h2. Another Reproduction\n{code:title=app.js}\nTi.UI.setBackgroundColor('#fff');\nvar winTest = Ti.UI.createWindow({ title: 'Test Window', url: \"test.js\", modal: true });\nwinTest.open();\n{code}\n\n{code:title=test.js}\nvar win = Ti.UI.currentWindow;\n\nvar label = Ti.UI.createLabel({ top: 0, width: 200, text: \"label #1\"});\nwin.add(label);\n \nvar label2 = Ti.UI.createLabel({ top: 30, width: 200, text: \"label #2\"});\nwin.add(label2);\n \nvar label3= Ti.UI.createLabel({ top: 60, width: 200, text: \"label #3\"});\nwin.add(label3);\n{code}", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-05-31T08:34:28.000+0000", "updated": "2011-05-31T08:34:28.000+0000" }, { "id": "156953", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "See Diane Hackborn's comment in:\r\n\r\nhttp://groups.google.com/group/android-developers/browse_thread/thread/ef45de483407d5cd\r\n\r\n... re fullscreen (no status bar) not working with translucency (our modal activity is translucent)", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-06-16T13:31:54.000+0000", "updated": "2011-06-16T13:31:54.000+0000" }, { "id": "156959", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Pull request ready:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/126\r\n\r\nProblem was we were using a fullscreen translucent theme for the modal activity. Two problems with this:\r\n\r\n* Parity problem: our iOS implementation is not using a fullscreen window by default for modals - -not sure why we were.\r\n* The combo of fullscreen (no status bar) + translucency does not work in Android (see link in previous comment). \r\n\r\nSwitched to Theme.Translucent (instead of Theme.Translucent.NoTitleBar.Fullscreen) and now respect the navBarHidden and fullscreen flags as well when used with modal flag.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-06-16T14:04:39.000+0000", "updated": "2011-06-16T14:04:39.000+0000" }, { "id": "157015", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "if {{modal}} is present we always use the modal theme even when modal is {{false}}.\r\n\r\n*app.js*\r\n{code}\r\n Ti.UI.setBackgroundColor('#fff');\r\n var winTest = Ti.UI.createWindow({ title: 'Test Window', url: \"test.js\", navBarHidden: false, fullscreen: false, modal: false });\r\n winTest.open();\r\n{code}\r\n\r\n*test.js*\r\n{code}\r\n var win = Ti.UI.currentWindow;\r\n\r\n var winTest2 = Ti.UI.createWindow({ title: 'Test Window 2', url: \"test2.js\", navBarHidden: true, fullscreen: true, modal: true });\r\n winTest2.open();\r\n{code}\r\n\r\n*test2.js*\r\n{code}\r\n var win = Ti.UI.currentWindow;\r\n\r\n var label = Ti.UI.createLabel({ top: 0, width: 200, text: \"label #1\"});\r\n win.add(label);\r\n \r\n var label2 = Ti.UI.createLabel({ top: 30, width: 200, text: \"label #2\"});\r\n win.add(label2);\r\n \r\n var label3= Ti.UI.createLabel({ top: 60, width: 200, text: \"label #3\"});\r\n win.add(label3);\r\n{code}\r\n", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-17T10:49:13.000+0000", "updated": "2011-06-17T10:49:55.000+0000" }, { "id": "157048", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "tested fix on 2.2 device and behavior looks good. approve of accepting associated pull request", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-06-17T13:21:52.000+0000", "updated": "2011-06-17T13:21:52.000+0000" }, { "id": "157141", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Merged to master.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-20T10:08:44.000+0000", "updated": "2011-06-20T10:08:44.000+0000" }, { "id": "158807", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with Nexus S 2.3.4 and Nexus One 2.2.2 with 1.7.2.v20110630161836", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-06T14:27:33.000+0000", "updated": "2011-07-06T14:27:33.000+0000" }, { "id": "171604", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fixing labels.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-05T13:39:31.000+0000", "updated": "2011-11-05T13:39:31.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }