{ "id": "100745", "key": "TIMOB-10832", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-09-14T10:18:07.000+0000", "created": "2012-09-10T17:52:58.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "parity", "regression" ], "versions": [ { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" } ], "issuelinks": [ { "id": "20982", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "100614", "key": "TIMOB-10812", "fields": { "summary": "Android: Ti.UI.SIZE on width does not work with horizontal layouts", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-23T17:55:23.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": "This is a regression issue. The picker by default is not center Aligned when used Ti SDK 2.1.2. It works fine on 2.1.1GA. There is no property for picker to set Alignment. This works fine on iOS for both 2.1.1 and 2.1.2.\r\n\r\nh4.Steps to Reproduce:\r\n\r\n1. Load the below app.js.\r\n2. Test it on Android 2.3.3 or any above versions of Android for Ti SDK 2.1.1GA\r\n3. Change the Ti SDK version to 2.1.2 in tiapp.xml file.\r\n4. Test the app again on Android 2.3.3\r\n\r\nExpected Behavior: It should behave similarly for both versions of SDKs.\r\n\r\nActual Behavior: It behaves differently in 2.1.2GA.\r\n\r\n{code}\r\n/*global Ti,Titanium,alert */\r\nvar w = Ti.UI.createWindow({\r\n\tbackgroundColor:'white'\r\n});\r\nvar status = Ti.UI.createLabel({\r\n\ttop: 5, left: 5, right: 5, height: 40, textAlign:'center'\r\n});\r\nw.add(status);\r\n\r\nfunction showStatus(s) {status.text = s;}\r\n\r\nvar names = ['Joanie', 'Mickey', 'Jean-Pierre', 'Gustav', 'Raul', 'Mimi', 'Emily', 'Sandra', 'Carrie', 'Chachi'];\r\nvar verbs = ['loves', 'likes', 'visits', 'loathes', 'waves to', 'babysits', 'accompanies', 'teaches', 'announces', 'supports', 'knows', 'high-fives'];\r\n\r\nvar rows1 = [];\r\nfor (var i = 0; i < names.length; i++) {\r\n\trows1.push(Ti.UI.createPickerRow({title: names[i]}));\r\n}\r\n\r\nvar rows2 = [];\r\nfor (i = 0; i < verbs.length; i++) {\r\n\trows2.push(Ti.UI.createPickerRow({title: verbs[i]}));\r\n}\r\n\r\nvar rows3 = [];\r\nfor (i = (names.length -1); i >=0; i--) {\r\n\trows3.push(Ti.UI.createPickerRow({title: names[i]}));\r\n}\r\n\r\nvar column1 = Ti.UI.createPickerColumn( {\r\n\trows: rows1, font: {fontSize: \"12\"}\r\n});\r\nvar column2 = Ti.UI.createPickerColumn( {\r\n\trows: rows2, font: {fontSize: \"12\"}\r\n});\r\nvar column3 = Ti.UI.createPickerColumn( {\r\n\trows: rows3, font: {fontSize: \"12\"}\r\n});\r\n\r\nvar picker = Ti.UI.createPicker({\r\n\tuseSpinner: true, visibleItems: 7,\r\n\ttype : Ti.UI.PICKER_TYPE_PLAIN,\r\n\ttop: 150, height: 200,\r\n\tcolumns: [ column1, column2, column3 ],\r\n\talign: 'center'\r\n});\r\n\r\npicker.addEventListener('change', function(e) {\r\n\tshowStatus(e.selectedValue[0] + \" \" + e.selectedValue[1] + \" \" + e.selectedValue[2]);\r\n});\r\n\r\nw.add(picker);\r\nvar btnSelect = Ti.UI.createButton({\r\n\tleft: 5, height: 40, top: 50, width: 150,\r\n\ttitle: 'Select idxs 2/4/6'\r\n});\r\nbtnSelect.addEventListener('click', function() {\r\n\tpicker.setSelectedRow(0, 2);\r\n\tpicker.setSelectedRow(1, 4);\r\n\tpicker.setSelectedRow(2, 6);\r\n});\r\nw.add(btnSelect);\r\n\r\nvar btnAdd = Ti.UI.createButton({\r\n\tleft: 165, height: 40, top: 50, width: 150,\r\n\ttitle: 'Add \"Manny\"'\r\n});\r\nbtnAdd.addEventListener('click', function() {\r\n\tpicker.columns[0].addRow(Ti.UI.createPickerRow({title: 'Manny'}));\r\n\tpicker.columns[2].addRow(Ti.UI.createPickerRow({title: 'Manny'}));\r\n\tshowStatus('\"Manny\" added to columns 0 & 2');\r\n});\r\nw.add(btnAdd);\r\n\r\nvar btnRemove = Ti.UI.createButton({\r\n\tleft: 5, height: 40, top: 100, width: 150,\r\n\ttitle: 'Remove all idx 3'\r\n});\r\nbtnRemove.addEventListener('click', function() {\r\n\tpicker.columns[0].removeRow( picker.columns[0].rows[3] );\r\n\tpicker.columns[1].removeRow( picker.columns[1].rows[3] );\r\n\tpicker.columns[2].removeRow( picker.columns[2].rows[3] );\r\n\tshowStatus(\"value at index 3 of each col. removed\");\r\n});\r\nw.add(btnRemove);\r\n\r\nvar btnCheckSelection = Ti.UI.createButton({\r\n\tleft: 165, height: 40, top: 100, width: 150,\r\n\ttitle: 'Check sel.'\r\n});\r\nbtnCheckSelection.addEventListener('click', function() {\r\n\tshowStatus(picker.getSelectedRow(0).title + ' ' + picker.getSelectedRow(1).title + ' ' + picker.getSelectedRow(2).title);\r\n\tvar color = status.backgroundColor || w.backgroundColor || \"black\";\r\n\tstatus.backgroundColor = 'red';\r\n\tsetTimeout(function(){status.backgroundColor=color;},1000);\r\n});\r\nw.add(btnCheckSelection);\r\nw.open();\r\n\r\n{code}\r\n", "attachment": [ { "id": "31172", "filename": "picker in 2.1.1.jpg", "author": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-11T14:53:57.000+0000", "size": 1141379, "mimeType": "image/jpeg" }, { "id": "31173", "filename": "picker in 2.1.2.jpg", "author": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-11T14:53:57.000+0000", "size": 936230, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "Android: Picker by default is not centered in 2.1.2 Build (regression issue)", "creator": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aakkinepally", "key": "aakkinepally", "displayName": "Amuktha Akkinepally", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android 2.3.3, Android 2.3.4, Android 2.3.6, Android 4.0.4, Titanium SDK 2.1.2 GA.", "comment": { "comments": [ { "id": "218414", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested the sample app and KS->Control->Picker with 2.1.1.GA and 2.1.2.GA and master. Can not see any difference.\r\nCan you provide a screenshot to show where the issue is? (I can not open the images attached on Help Desk ticket).", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-11T12:04:59.000+0000", "updated": "2012-09-11T14:44:52.000+0000" }, { "id": "415310", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate with reference to the linked issues above.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T17:55:23.000+0000", "updated": "2017-03-23T17:55:23.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }