{ "id": "91378", "key": "TIMOB-8998", "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": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-01-10T18:07:04.000+0000", "created": "2012-05-04T14:00:23.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "58856", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "175703", "key": "TIMOB-28228", "fields": { "summary": "Android: Add TableView \"moveable\" support", "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": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": null, "updated": "2020-11-06T01:51:59.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": "h2. Problem\r\n\r\nOn iOS, a tableview can be set to {{editing}} and/or {{moving}} modes, which allow the user to delete or re-order rows respectively.\r\n\r\nTo provide parity, implement this functionality for Android.\r\n\r\nSee attached image for an example.\r\n\r\nSee [Titanium.UI.TableView|http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.UI.TableView] documentation for the current iOS behavior.\r\n\r\nh2. Test case\r\n\r\nThis code may be used for testing different combinations of editing/moving and editable/moveable (inherited and explicit) properties.\r\n\r\nEnable landscape mode to see the full text of each row.\r\n\r\n{code:lang=javascript|title=app.js}\r\nTi.UI.setBackgroundColor('#ddd');\r\nvar win = Ti.UI.createWindow({\r\n\ttitle:'TableView Edit and Move Demo',\r\n\tlayout:'vertical'\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle:'Edit',\r\n\tright: 10, top:10,\r\n\twidth:100, height:50\r\n});\r\nwin.add(button);\r\n\r\nvar data = [\r\n\t{title:'1. Inherit edit, Inherit move'},\r\n\t\r\n\t{title:'2. Inherit edit, explicit move true', moveable:true},\r\n\t{title:'3. Inherit edit, explicit move false', moveable:false},\r\n\t{title:'4. Explicit edit true, Inherit move', editable:true},\r\n\t{title:'5. Explicit edit false, Inherit move', editable:false},\r\n\t\r\n\t{title:'6. Explicit edit true, explicit move true', editable:true, moveable:true},\r\n\t{title:'7. Explicit edit true, explicit move false', editable:true, moveable:false},\r\n\t{title:'8. Explicit edit false, explicit move true', editable:false, moveable:true},\r\n\t{title:'9. Explicit edit false, explicit move false', editable:false, moveable:false}\r\n];\r\n\r\nvar tableview = Ti.UI.createTableView({\r\n\tbackgroundColor:'white',\r\n\tdata:data,\r\n\teditable:true,\r\n\tmoveable:false,\r\n\ttop:10\r\n});\r\n\r\nwin.add(tableview);\r\n\r\nvar isTableModifiable = false;\r\n\r\nbutton.addEventListener('click', function(e){\r\n\tif(isTableModifiable){\r\n\t\t// exit edit/move mode\r\n\t\te.source.title = 'Edit';\r\n\t\ttableview.moving = false;\r\n\t\ttableview.editing = false;\r\n\t} else {\r\n\t\t// enter edit/move mode\r\n\t\te.source.title = 'Cancel';\r\n\t\ttableview.moving = true;\r\n\t\ttableview.editing = true;\t\t\r\n\t}\r\n\tisTableModifiable = !isTableModifiable;\r\n});\r\n\r\nwin.open();\r\n{code}", "attachment": [ { "id": "27537", "filename": "iOS Simulator.png", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-04T14:06:20.000+0000", "size": 50480, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: UI.TableView and TableViewRow - add editing and moving modes and editable and moveable properties", "creator": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "* Titanium 2.0.1 GA2\r\n* Android APIs 2.2\r\n* v8", "comment": { "comments": [ { "id": "368967", "author": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "body": "Any chance this will ever be implemented ?", "updateAuthor": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2015-11-04T11:35:20.000+0000", "updated": "2015-11-04T11:35:20.000+0000" }, { "id": "453652", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. \r\n\r\nIf community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-10T18:07:04.000+0000", "updated": "2020-01-10T18:07:04.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }