[TIMOB-19139] Ti.UI.ListView.dividerHeight should be separatorHeight
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2015-07-02T10:09:58.000+0000 |
| Affected Version/s | Release 4.1.0 |
| Fix Version/s | Release 4.1.0 |
| Components | Android |
| Labels | listview, qe-4.1.0 |
| Reporter | Fokke Zandbergen |
| Assignee | Ashraf Abu |
| Created | 2015-07-02T08:31:58.000+0000 |
| Updated | 2015-09-21T17:43:03.000+0000 |
Description
[Ti.UI.ListView.dividerHeight](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListView-property-dividerHeight) should be named
separatorHeight. I know the native property is called dividerHeight on Android, but separatorColor is also available on Android and we should use different names for the same element and we already have separatorInsets and separatorStyle as well.
https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiListView.java#L710-L719
4_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/6950 Master PR: https://github.com/appcelerator/titanium_mobile/pull/6951
var win = Ti.UI.createWindow({backgroundColor:'#000'}); var listView = Ti.UI.createListView({ separatorColor:'blue', separatorHeight: "3dp" }); var sections = []; var fruitSection = Ti.UI.createListSection(); var fruitDataSet = [ {properties: { title: 'Apple'}}, {properties: { title: 'Banana'}}, {properties: { title: 'Apple'}}, {properties: { title: 'Banana'}}, ]; fruitSection.setItems(fruitDataSet); sections.push(fruitSection); listView.sections = sections; listView.addEventListener('itemclick', function(e){ if (listView.separatorHeight == "3dp") { listView.separatorHeight = 20; } else { listView.separatorHeight = "3dp"; } }); win.add(listView); win.open();PR merged.
Verified the implementation. Closing. Environment: Appc Studio : 4.1.0.201507071122 Ti SDK : 4.2.0.v20150714071826 Ti CLI : 4.0.1 Alloy : 1.6.2 MAC Yosemite : 10.10.4 Appc NPM : 4.1.0 Appc CLI : 4.1.0 Node: v0.10.37 Genymotion emulator - android 5.1.0