{
"id": "114772",
"key": "ALOY-727",
"fields": {
"issuetype": {
"id": "1",
"description": "A problem which impairs or prevents the functions of the product.",
"name": "Bug",
"subtask": false
},
"project": {
"id": "11113",
"key": "ALOY",
"name": "Alloy",
"projectCategory": {
"id": "10400",
"description": "Tools for developing applications",
"name": "Tooling"
}
},
"fixVersions": [
{
"id": "15758",
"description": "Alloy 1.4.0",
"name": "Alloy 1.4.0",
"archived": false,
"released": true,
"releaseDate": "2014-07-17"
}
],
"resolution": {
"id": "1",
"description": "A fix for this issue is checked into the tree and tested.",
"name": "Fixed"
},
"resolutiondate": "2014-01-22T20:29:34.000+0000",
"created": "2013-05-22T17:18:24.000+0000",
"priority": {
"name": "Medium",
"id": "3"
},
"labels": [
"alloy",
"android",
"optiondialog",
"qe-testadded"
],
"versions": [],
"issuelinks": [
{
"id": "34533",
"type": {
"id": "10003",
"name": "Relates",
"inward": "relates to",
"outward": "relates to"
},
"inwardIssue": {
"id": "125248",
"key": "ALOY-934",
"fields": {
"summary": "Change androidView behavior for optionDialog and similar components",
"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": "Low",
"id": "4"
},
"issuetype": {
"id": "7",
"description": "gh.issue.story.desc",
"name": "Story",
"subtask": false
}
}
}
}
],
"assignee": {
"name": "tlukasavage",
"key": "tlukasavage",
"displayName": "Tony Lukasavage",
"active": true,
"timeZone": "America/Los_Angeles"
},
"updated": "2014-05-08T23:47:43.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": "12332",
"name": "Titanium SDK",
"description": "Any integration or issues with the TiSDK"
}
],
"description": "The customView (androidView property) of an OptionDialog, does not work as expected. The content does not show when it is added through the controller.\r\n\r\nThe following does not work: (custom view inside OptionDialog tag) where \r\n{code:xml}\r\n\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n{code}\r\n\r\n{code:javascript}\r\n$.name.text = Alloy.language.Name+\": \" + company.CompanyName;\r\n$.address.text = Alloy.language.Address+\": \" + company.CompanyAddress;\r\n$.zip.text = Alloy.language.ZipCode+\": \" + company.CompanyZipCode;\r\n$.city.text = Alloy.language.City+\": \" + company.CompanyCity;\r\n$.phone.text = Alloy.language.Phone+\": \" + company.CompanyPhone;\r\n$.mail.text = Alloy.language.Email+\": \" + company.CompanyEmail;\r\n{code}\r\n\r\n\r\nThe following do work: (here I add the androidView manually through the controller)\r\n\r\n{code:xml}\r\n\r\n\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n{code}\r\n\r\n\r\n{code:javascript}\r\n$.name.text = Alloy.language.Name+\": \" + company.CompanyName;\r\n$.address.text = Alloy.language.Address+\": \" + company.CompanyAddress;\r\n$.zip.text = Alloy.language.ZipCode+\": \" + company.CompanyZipCode;\r\n$.city.text = Alloy.language.City+\": \" + company.CompanyCity;\r\n$.phone.text = Alloy.language.Phone+\": \" + company.CompanyPhone;\r\n$.mail.text = Alloy.language.Email+\": \" + company.CompanyEmail;\r\n\r\nif(OS_ANDROID){\r\n\t//manually set the androidView property\r\n\t$.dialogView.androidView = $.containerView;\r\n\t$.dialogView.show();\r\n}\r\n{code}",
"attachment": [],
"flagged": false,
"summary": "Alloy: OptionDialog androidView not showing up",
"creator": {
"name": "viezel",
"key": "viezel",
"displayName": "Mads Moller",
"active": true,
"timeZone": "Europe/Berlin"
},
"subtasks": [],
"reporter": {
"name": "viezel",
"key": "viezel",
"displayName": "Mads Moller",
"active": true,
"timeZone": "Europe/Berlin"
},
"environment": "3.1.0.GA, Alloy 1.1.2",
"comment": {
"comments": [
{
"id": "253517",
"author": {
"name": "dsefton",
"key": "dsefton",
"displayName": "Daniel Sefton",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "Hi Mads,\n\nPlease could you either attach a project which reproduces the problem, or organise your code snippets to be complete for us to drop into a new project and run?\n\nThanks!",
"updateAuthor": {
"name": "dsefton",
"key": "dsefton",
"displayName": "Daniel Sefton",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2013-05-22T22:19:04.000+0000",
"updated": "2013-05-22T22:19:04.000+0000"
},
{
"id": "259668",
"author": {
"name": "shossain",
"key": "shossain",
"displayName": "Shak Hossain",
"active": false,
"timeZone": "America/Los_Angeles"
},
"body": "Hi Tony,\n\nMoving this ti Alloy for your feedback. Even though Daniel asked for a test case, we have yet to receive it. However, the reporter is a well-known titan and I am under the impression that the issue is valid. Leaving it upto to you.\n\nThanks,\nShak",
"updateAuthor": {
"name": "shossain",
"key": "shossain",
"displayName": "Shak Hossain",
"active": false,
"timeZone": "America/Los_Angeles"
},
"created": "2013-06-27T03:44:44.000+0000",
"updated": "2013-06-27T03:44:44.000+0000"
},
{
"id": "283107",
"author": {
"name": "mrahman",
"key": "mrahman",
"displayName": "Mostafizur Rahman",
"active": true,
"timeZone": "Asia/Dhaka"
},
"body": "Hello,\r\n\r\nI tested this issue the test code below. I was able to reproduce the problem. It does occur when I try to update android View content from controller.\r\n\r\nh5. Test Environment: \r\n\r\nOS: MAC OS X 10.8.5\r\nTi SDK: 3.1.3 GA, 3.2.0.x\r\nTi CLI: 3.3.0\r\nAlloy 1.2.2, 1.3.0-beta\r\nAndroid Device\r\nAndroid SDK 2.3.3, 4.2.2 \r\n\r\n\r\nh5. Test Code\r\n*index.xml*\r\n{code}\r\n\r\n\t\r\n\r\n\t\t\r\n\t\t\t\r\n\t\t\t\tbutton 1\r\n\t\t\t\tbutton 2\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n*index.js*\r\n\r\n{code}\r\nfunction showOptions(e) {\r\n\t$.options.show();\r\n}\r\n\r\n$.avLabel.text = 'This is an androidView';\r\n\r\n$.index.open();\r\n\r\n{code}\r\n\r\n*index.tss*\r\n\r\n{code}\r\n\"Window\": {\r\n backgroundColor: '#fff'\r\n},\r\n\"Button\": {\r\n height: Ti.UI.SIZE,\r\n width: Ti.UI.SIZE\r\n}, \r\n\"#avLabel\": {\r\n color: '#fff',\r\n left: '20dp',\r\n height: Ti.UI.SIZE,\r\n width: Ti.UI.SIZE,\r\n textAlign: 'center',\r\n font: {\r\n fontSize: '16dp'\r\n }\r\n}\r\n{code}\r\n\r\nh5. Step to test\r\n# Create a new alloy project\r\n# Paste test code in index.js/ index.xml/ index.tss\r\n# Now run on android device/Emulator\r\n# Click on button, it will display blank option dialog with two buttons \r\n\r\nh5. Actual result \r\n “This is an androidView” will display in OptionDialog\r\n\r\n",
"updateAuthor": {
"name": "shossain",
"key": "shossain",
"displayName": "Shak Hossain",
"active": false,
"timeZone": "America/Los_Angeles"
},
"created": "2013-12-08T08:02:36.000+0000",
"updated": "2013-12-08T19:30:39.000+0000"
},
{
"id": "289024",
"author": {
"name": "skypanther",
"key": "skypanther",
"displayName": "Tim Poulsen",
"active": true,
"timeZone": "America/New_York"
},
"body": "I am seeing the behavior described in the ticket, but the problem is not as indicated. The View and Label are present, however the generated controller does not have a variable $.avLabel, so the assignment in index.js does nothing.\n\nIn other words, change the Label tag to the following and the app works as written (though I added a space added between \"androidView\"layout).\n\n\n\n\nFull, working index.xml:\n\n{code}\n\n \n \n \n button 1\n button 2\n \n \n \n \n \n \n \n\n{code}\n\nindex.js and index.tss as above.",
"updateAuthor": {
"name": "skypanther",
"key": "skypanther",
"displayName": "Tim Poulsen",
"active": true,
"timeZone": "America/New_York"
},
"created": "2014-01-21T15:28:24.000+0000",
"updated": "2014-01-21T15:28:24.000+0000"
},
{
"id": "289286",
"author": {
"name": "tlukasavage",
"key": "tlukasavage",
"displayName": "Tony Lukasavage",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "PR: https://github.com/appcelerator/alloy/pull/309\r\ntest app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-727\r\n\r\nh3. functional test\r\n\r\n# Run the test app for android\r\n# Click the \"options\" button\r\n# Assert that the OptionDialog that pops up has 2 buttons and has a label in it that contains the phrase \"This is an androidView\". Make sure it does *not* have the phrase \"This is a label\".\r\n# Inspect the generated code in \"Resources/android/alloy/controllers/index.js\" and make sure that the views for both *androidView* and *avLabel* are generated only once.\r\n\r\nPrior to this fix, the label in step #3 would say \"This is a label\" and the *androidView* and *avLabel* views would have been generated twice in the controller. ",
"updateAuthor": {
"name": "tlukasavage",
"key": "tlukasavage",
"displayName": "Tony Lukasavage",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2014-01-22T20:29:34.000+0000",
"updated": "2014-01-22T20:29:34.000+0000"
},
{
"id": "304121",
"author": {
"name": "lchoudhary",
"key": "lchoudhary",
"displayName": "Lokesh Choudhary",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "Verified the fix. We see expected results as mentioned by [~tlukasavage] in his comments for verification of the fix.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 3.3.0.201405011408\r\nTi SDK : 3.3.0.v20140508101423\r\nMac OSX : 10.8.5\r\nAlloy : 1.4.0-dev\r\nCLI - 3.3.0-dev\r\nNexus 5 - android 4.4.2",
"updateAuthor": {
"name": "lchoudhary",
"key": "lchoudhary",
"displayName": "Lokesh Choudhary",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2014-05-08T23:47:43.000+0000",
"updated": "2014-05-08T23:47:43.000+0000"
}
],
"maxResults": 9,
"total": 9,
"startAt": 0
}
}
}