{ "id": "127184", "key": "TIMOB-16552", "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": "15935", "description": "2014 Sprint 06", "name": "2014 Sprint 06", "archived": true, "released": true, "releaseDate": "2014-03-28" }, { "id": "15936", "description": "2014 Sprint 06 SDK", "name": "2014 Sprint 06 SDK", "archived": true, "released": true, "releaseDate": "2014-03-28" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-03-17T18:17:47.000+0000", "created": "2014-03-05T16:41:18.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_tableviewrow", "qe-closed-3.2.3", "qe-testadded", "regression", "supportTeam" ], "versions": [ { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-08-15T21:16:54.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": "h3. Issue\r\n\r\nWhen using the classname in the rows the alignment starts to get disturbed and some rows get cut off, if the classname is removed the alignment works ok but customer reports a slow performance during the scroll.\r\n\r\nh3. Test case\r\n\r\napp.js\r\n{code}\r\nvar osname = Ti.Platform.osname, version = Ti.Platform.version, height = Ti.Platform.displayCaps.platformHeight, width = Ti.Platform.displayCaps.platformWidth;\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'white',\r\n title : 'TableView Demo'\r\n});\r\n\r\nvar defaultFontSize = Ti.Platform.name === 'android' ? 16 : 14;\r\n\r\nvar data = [];\r\n\r\nvar tableData = [{\r\n title : \"dhvdk hdkhgdks kldhfkld hdklfk \",\r\n subTitle : ' bdfkjd fdhfh dfhdsf dfh d dhfd fhdfhd fdlfh '\r\n}, {\r\n title : \" dfdj\",\r\n subTitle : 'bdbfdfdfdf,bd'\r\n}, {\r\n title : \" bdfbdjbfjdbfdjbfdjkfhdjhfdjhfdjkhfjdbfjdhfjdfhjdhfjdhfdjhfjdhf jdfhjdfhdjfhdjhfdh\",\r\n subTitle : 'dfbdbfdjbjdbsfjdhfjdksfjsfhdjksfhdjksbfdjkbfvdbfdjkbfjkdfhdjkbfh fjdfhjdfhdjk f fdjfhdjhfdjhf'\r\n}, {\r\n title : \" dffdfdfdfdfdfd\",\r\n subTitle : 'fdfdfdfsssdfdsfdsfdfdfdfdfdfdfd'\r\n}, {\r\n title : \"fdfd\",\r\n subTitle : 'fdfdfdfd'\r\n}, {\r\n title : \"fdfssssssghjgjhjj\",\r\n subTitle : 'gfgfgfdgfgfgfgfgfgf'\r\n}, {\r\n title : \"gfgfgfg\",\r\n subTitle : 'gfgfgfgfgffgfg'\r\n}, {\r\n title : \"gfgfgfgf\",\r\n subTitle : 'gfgfgfgfgfggfgfgfgfgfgf fgfgfdgfgfdgfgfd gfgfgf'\r\n}, {\r\n title : \"gfgfgfgfgfgfgfgfgfgfgfgfgf fgfgfgfgfg\",\r\n subTitle : ' gfgfgf gfgfgf gfgfg gfgfgfg'\r\n}, {\r\n title : \"ffgg fgfgfg fggfg\",\r\n subTitle : 'gfgfgfgfg'\r\n}, {\r\n title : \"fgfgf\",\r\n subTitle : 'gfgfgffggg'\r\n}, {\r\n title : \"gfgfererere\",\r\n subTitle : 'gfgfgf'\r\n}, {\r\n title : \"ggff\",\r\n subTitle : 'gffdgfdgfdgodjfdojfdjfj fdjfdjkfd;jf'\r\n}, {\r\n title : \"fdfddfdfdshfhdhfdhflssssssssssssss dhlfffffffff dflhhhhhhhhh\",\r\n subTitle : 'fdfdfdgd fdfd fdfd dfdf dfd '\r\n}, {\r\n title : \"fdfdfdf dfdfdf \",\r\n subTitle : 'fd'\r\n}, {\r\n title : \"fdfdf fdf \",\r\n subTitle : ''\r\n}, {\r\n title : \"fdfdfd\",\r\n subTitle : 'fdfdfdf'\r\n}];\r\n\r\nfor (var i = 0; i < tableData.length; i++) {\r\n var row = Ti.UI.createTableViewRow({\r\n className : 'forumEvent' + (i % 2),\r\n selectedBackgroundColor : 'green',\r\n layout : 'horizontal'\r\n });\r\n\r\n var labelUserName = Ti.UI.createLabel({\r\n color : '#576996',\r\n font : {\r\n fontFamily : 'Arial',\r\n fontSize : defaultFontSize,\r\n fontWeight : 'bold'\r\n },\r\n text : tableData[i].title,\r\n backgroundColor : 'red',\r\n left : 10,\r\n top : 10,\r\n horizontalWrap : true,\r\n width : '85%'\r\n });\r\n row.add(labelUserName);\r\n\r\n var labelDetails = Ti.UI.createLabel({\r\n color : '#222',\r\n backgroundColor : 'yellow',\r\n font : {\r\n fontFamily : 'Arial',\r\n fontSize : defaultFontSize,\r\n fontWeight : 'normal'\r\n },\r\n text : tableData[i].subTitle + '.',\r\n left : 10,\r\n bottom : 10,\r\n horizontalWrap : true,\r\n width : '85%'\r\n });\r\n row.add(labelDetails);\r\n\r\n data.push(row);\r\n}\r\n\r\nvar tableView = Ti.UI.createTableView({\r\n backgroundColor : 'white',\r\n data : data,\r\n separatorColor : 'black'\r\n});\r\n\r\nwin.add(tableView);\r\nwin.open();\r\n{code}\r\n\r\nh3. Steps to Repro\r\n\r\n1. Run the testcase\r\n2. Scrolldown the tableview\r\n\r\nExpected Results: The rows should look correctly aligned and completely visible.\r\n\r\nActual Results: Some of the rows are cut off and extra space is added in others.\r\n\r\nh3. Testing\r\n\r\nWhen removing the class name the rows work as expected. Also this issue is not present on SDK 3.1.3 and prior\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Table View Row alignment getting disturbed when using Class Name", "creator": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Product: Titanium SDK\r\nTitanium SDK: Mobile 3.2GA\r\nPlatform OS: Android\r\nPlatform OS Version: all", "comment": { "comments": [ { "id": "297438", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "When view heirarchies are same, reset the content height and width to -1 so that it is calculated again based on children\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5483", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-03-16T10:47:37.000+0000", "updated": "2014-03-16T10:47:37.000+0000" }, { "id": "301381", "author": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified fix with following environment:\r\n\r\nAppc Studio: 3.2.3.201404162038\r\nSDK build: 3.2.3.v20140417162517 and 3.3.0.v20140417173316(Master build)\r\nacs: 1.0.14\r\nnpm: 1.3.2\r\nalloy:1.3.1\r\nCLI: titanium@3.2.3-beta\r\ntitanium-code-processor:1.1.1-beta1\r\nXcode: 5.1.1\r\nOsx: Mavericks(10.9.2)\r\nDevice: Nexus 7 (4.3)\r\n\r\nThe rows are correctly aligned and completely visible without any truncation. Hence closing the issue.", "updateAuthor": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-18T06:07:18.000+0000", "updated": "2014-04-18T06:07:18.000+0000" }, { "id": "318949", "author": { "name": "osama", "key": "osama", "displayName": "Osama Abbas", "active": true, "timeZone": "Asia/Tokyo" }, "body": "This issue still there. At least on Android 4.1 and Android 4.2.\r\n\r\nPlease download the code sample and try with/without className property. Scroll down and you will see the text is complete when className is removed, but when className is the result is different.", "updateAuthor": { "name": "osama", "key": "osama", "displayName": "Osama Abbas", "active": true, "timeZone": "Asia/Tokyo" }, "created": "2014-08-15T21:16:54.000+0000", "updated": "2014-08-15T21:16:54.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }