{ "id": "175836", "key": "AC-6636", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": null, "resolutiondate": null, "created": "2020-11-29T13:27:27.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-11-29T13:28:21.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "Adding support for horizontal scrollType to ListViews and TableView:\r\n\r\n !20201129_142049.gif! \r\n\r\n{code}\r\nvar toggle = false;\r\nvar win = Ti.UI.createWindow();\r\nvar btn = Ti.UI.createButton({\r\n\ttitle: \"change\",\r\n\tbottom: 20\r\n});\r\n\r\nbtn.addEventListener(\"click\", function() {\r\n\tif (!toggle) {\r\n\t\tlistView.scrollType = \"horizontal\"\r\n\t\ttable.scrollType = \"horizontal\"\r\n\r\n listView.height = 100\r\n\t\ttable.height = 100\r\n\t} else {\r\n\t\tlistView.scrollType = \"vertical\"\r\n\t\ttable.scrollType = \"vertical\"\r\n listView.height = 300\r\n\t\ttable.height = 300\r\n\t}\r\n\ttoggle = !toggle;\r\n})\r\nwin.add(btn);\r\n\r\n\r\n// ---------------- listview\r\nvar listView = Ti.UI.createListView({\r\n top: 0,\r\n height: 300\r\n});\r\nvar sections = [];\r\n\r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});\r\nvar fruitDataSet = [\r\n {properties: { title: 'Apple'}},\r\n {properties: { title: 'Banana'}},\r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\n\r\nvar vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables'});\r\nvar vegDataSet = [\r\n {properties: { title: 'Carrots'}},\r\n {properties: { title: 'Potatoes'}},\r\n];\r\nvegSection.setItems(vegDataSet);\r\nsections.push(vegSection);\r\n\r\nlistView.sections = sections;\r\nwin.add(listView);\r\n\r\nvar fishSection = Ti.UI.createListSection({ headerTitle: 'Fish'});\r\nvar fishDataSet = [\r\n {properties: { title: 'Cod'}},\r\n {properties: { title: 'Haddock'}},\r\n];\r\nfishSection.setItems(fishDataSet);\r\nlistView.appendSection(fishSection);\r\n\r\n// ---------------- tableview\r\nvar tableData = [ {title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'}, {title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'} ];\r\nvar table = Ti.UI.createTableView({\r\n\tdata: tableData,\r\n\ttop: 350,\r\n height: 300\r\n});\r\nwin.add(table);\r\nwin.open();\r\n{code}", "attachment": [ { "id": "67732", "filename": "20201129_142049.gif", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-11-29T13:27:14.000+0000", "size": 378409, "mimeType": "image/gif" } ], "flagged": false, "summary": "Android: Horizontal layout for ListViews/TableView", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "457736", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/12301\r\n\r\nto add even more features to the new RecyclerViews :)", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-11-29T13:28:21.000+0000", "updated": "2020-11-29T13:28:21.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }