Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19139] Ti.UI.ListView.dividerHeight should be separatorHeight

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2015-07-02T10:09:58.000+0000
Affected Version/sRelease 4.1.0
Fix Version/sRelease 4.1.0
ComponentsAndroid
Labelslistview, qe-4.1.0
ReporterFokke Zandbergen
AssigneeAshraf Abu
Created2015-07-02T08:31:58.000+0000
Updated2015-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

Comments

  1. Ashraf Abu 2015-07-02

    4_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/6950 Master PR: https://github.com/appcelerator/titanium_mobile/pull/6951
  2. Ashraf Abu 2015-07-02

       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();
       
  3. Chee Kiat Ng 2015-07-02

    PR merged.
  4. Lokesh Choudhary 2015-07-14

    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

JSON Source