{ "id": "118190", "key": "TIMOB-15495", "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": null, "resolutiondate": null, "created": "2013-08-09T09:34:25.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "holo", "listview", "tableview", "theme" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [ { "id": "56880", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "172171", "key": "TIMOB-26354", "fields": { "summary": "Android: Refactor TabGroup and introduce new style", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": null, "updated": "2018-09-28T15:06:27.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": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h4. Problem Description\r\n\r\nWhen using a ListView on Android with a Holo theme, there are discrepancies between how the TableView was originally displayed, and how the ListView is displayed. This is especially apparent in the section-titles, and in buttons on a table-view row, neither of which seem to change when the theme changes. See the attached screenshots.\r\n\r\nh4. Steps to reproduce\r\n\r\n1. Create a new mobile project\r\n2. Import the attached test case\r\n3. Click in the tab 1, should show you a tableview\r\n4. Click in the tab 2, should show you the same data, but implemented in a listview.\r\n5. The theme in both cases should be the same, but it's different.\r\n\r\n\r\nh4. Extra info \r\nI have attached a test-project to demonstrate this issue. The app has two tabs, one containing a TableView, and one containing a ListView. Both tables have a similar buildup and should look identical. However, they don't.\r\n\r\nThe project in the zip-file contains a git repository. Switch between different commits to view the issue in the default theme, holo dark (currently selected) and holo light. \r\n", "attachment": [ { "id": "42468", "filename": "Listview_theming.patch", "author": { "name": "tinkertank", "key": "tinkertank", "displayName": "Tijs Zwinkels", "active": true, "timeZone": "Europe/London" }, "created": "2013-09-13T15:47:18.000+0000", "size": 3888, "mimeType": "text/plain" }, { "id": "41418", "filename": "ListViewTheming.zip", "author": { "name": "tinkertank", "key": "tinkertank", "displayName": "Tijs Zwinkels", "active": true, "timeZone": "Europe/London" }, "created": "2013-08-09T09:34:25.000+0000", "size": 5632237, "mimeType": "application/zip" }, { "id": "41419", "filename": "Screenshot_2013-08-09-09-54-00.png", "author": { "name": "tinkertank", "key": "tinkertank", "displayName": "Tijs Zwinkels", "active": true, "timeZone": "Europe/London" }, "created": "2013-08-09T09:34:25.000+0000", "size": 78181, "mimeType": "image/png" }, { "id": "41420", "filename": "Screenshot_2013-08-09-09-54-04.png", "author": { "name": "tinkertank", "key": "tinkertank", "displayName": "Tijs Zwinkels", "active": true, "timeZone": "Europe/London" }, "created": "2013-08-09T09:34:25.000+0000", "size": 85923, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: ListView doesn't correctly adhere to the Holo theme", "creator": { "name": "tinkertank", "key": "tinkertank", "displayName": "Tijs Zwinkels", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "tinkertank", "key": "tinkertank", "displayName": "Tijs Zwinkels", "active": true, "timeZone": "Europe/London" }, "environment": "Titanium Studio, build: 3.1.0.201304151600\r\nSDK 3.1.1.GA", "comment": { "comments": [ { "id": "271067", "author": { "name": "tinkertank", "key": "tinkertank", "displayName": "Tijs Zwinkels", "active": true, "timeZone": "Europe/London" }, "body": "I've attached a patch to titanium_mobile that solves the problem of the switch theming for me. Instead of creating the switch programatically, I'm now using the inflater to create the switch from a .xml file (the same way that Listview-items are created). For some reason, this causes the button to be themed correctly.\n\nHowever, this patch is not pull-request material:\n- I'm still not sure what the underlaying issue is here. Even in the old (non-working) case; Buttons are created in the same way, and since theming in Android should be hierarchical, I think they should have the same theme. I'm not sure why this works, and the old code didn't.\n- Right now, the 'SWITCH_STYLE_CHECKBOX' is created in a different way than the 'SWITCH_STYLE_TOGGLEBUTTON', but I can rectify that if required.\n- I haven't overridden the 'onLayout' method that was originally overridden. This doesn't seem to cause problems for me, but it might for you.\n\n\nIf you need to theme the section-header, that's a bit simpler.\n1) Build the android app\n2) Create a platform/android/res/layout directory in the root of your project.\n3) Copy build/android/res/layout/titanium_ui_list_header_or_footer.xml into the newly created directory.\n\nNow, the theming of the header and footer can be customised by editing the .xml file.\n", "updateAuthor": { "name": "tinkertank", "key": "tinkertank", "displayName": "Tijs Zwinkels", "active": true, "timeZone": "Europe/London" }, "created": "2013-09-13T16:01:11.000+0000", "updated": "2013-09-13T16:01:11.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }