{ "id": "63485", "key": "TIMOB-2853", "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": "11357", "description": "Mobile 1.8.0 M04", "name": "Sprint 2011-25", "archived": true, "released": true, "releaseDate": "2011-06-27" }, { "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:58:34.000+0000", "created": "2011-04-15T03:31:11.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "11233", "name": "Release 1.6.0", "archived": true, "released": true, "releaseDate": "2011-02-23" } ], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2011-11-05T13:58:34.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}
Creating a Ti.UI.ImageView or a Ti.UI.Button with an opacity of\r\n1 causes a Null Reference Exception to be thrown on Android. An\r\nopacity less than 1 works fine, such as 0.5.
\r\nThis might affect other controls, but I saw it happening on\r\nimage views and buttons in particular. I believe Ti.UI.View doesn't\r\nhave this problem (you can create it with an opacity of 1 and it\r\nworks just fine).
\r\nNo exception should be thrown.
\r\nTitanium Mobile 1.6.0 (Jan 06 2011)
\r\nBROKEN on Android Simulator 2.2
\r\nWORKS on iPhone Simulator 4.2
\r\nvar win = Ti.UI.createWindow({ title: 'Opacity Fail!', backgroundImage: 'default.png' });\r\nwin.add(Ti.UI.createImageView({\r\n image: 'KS_nav_ui.png',\r\n opacity: 1,\r\n top: 0, right: 0, left: 0, height: 200\r\n}));\r\nwin.add(Ti.UI.createButton({\r\n title: 'I am a button! Awesome, eh?',\r\n opacity: 1,\r\n bottom: 0, right: 0, left: 0, height: 200\r\n}));\r\nwin.open();
\r\n
\r\nAttached.
\r\nhttp://developer.appcelerator.com/helpdesk/view/61351#c308231
This also affects UILabel elements:
\n\nvar win = Ti.UI.createWindow();\n \nvar registerLabel = Titanium.UI.createLabel(\n{\n text: 'Stuff in here',\n top:'320dp',\n font: {\n fontSize:'12sp'\n }}\n);\n\nregisterLabel.opacity = 0;\n\nvar button = Ti.UI.createButton( {\n title: \"Login\",\n opacity: .2,\n height:'51dp',\n width:'300dp',\n top:'240dp',\n font: {\n fontSize:'20sp', fontWeight:'bold'\n }}\n);\nwin.add(button);\nwin.add(registerLabel);\n\nbutton.addEventListener('click', function(){\n registerLabel.opacity = 1;\n});\n\nwin.open();
\n
We have enterprise level interest in this now.
\nI can confirm that opacity value of 1 (or 1.0) for image view\nkills the app on Ti Mobile 1.6.1 and Android 1.6.
\nFor those looking for a workaround, if it isn't\nobvious, use 0.99 instead of 1.