Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1059] ListView iOS: SeparatorInsets applied on both ListItems & ListSections

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2014-07-15T15:16:50.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsios, listview
ReporterHans Knöchel
AssigneeMauro Parra-Miranda
Created2014-05-31T19:47:18.000+0000
Updated2016-03-08T07:37:24.000+0000

Description

When using the iOS-Property separatorInsets on spacing the ListView-separator to the left, the spacing is applied on both ListItem (as expected) and ListSection-title (not expected). Simple test case:
var win = Ti.UI.createWindow();
var list = Ti.UI.createListView({
	top: 20,
	separatorInsets: {
		left: 77
	}
});
var section = Ti.UI.createListSection({
	headerTitle : "My Section"
});

list.setSections([section]);

win.add(list);
win.open();
Summary: We need to set the separatorInsets only on the ListItem itself, not on its parent Section.

Attachments

FileDateSize
Bildschirmfoto 2014-05-31 um 21.46.35.png2014-05-31T19:47:18.000+0000146763

Comments

  1. Motiur Rahman 2014-07-15

    Hi, We have tested this issue with sample code has provided . [according to doc](http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ListView-property-separatorInsets) “The inserts for list view separators (applies to all cell)”. That means spacing will be applied on both List Item and List Section. Its not SDK bug.

    Testing Environment:

    Titanium SDK: 3.2.3.GA, 3.3.0.RC Titanium CLI: 3.3.0 –rc, iOS SDK: 7.1, OS X Version: 10.9.3, Appcelerator Studio: 3.2.3

    Steps to Reproduce:

    1.Create a Classic project. 2.Paste this code in app.js file. 3.Run this code with testing environment.
       var win = Ti.UI.createWindow();
       var list = Ti.UI.createListView({
       	top : 20,
       	separatorInsets : {
       		left : 77
       	}
       });
       var section = Ti.UI.createListSection({
       	headerTitle : "My Section"
       });
       
       list.setSections([section]);
       
       win.add(list);
       win.open(); 
       
    Thanks.
  2. Mauro Parra-Miranda 2014-07-15

    Hello! AFAIK, this is no bug. If you want, we can add it as new feature. If you want it as new feature, please explain the details about this feature.
  3. Hans Knöchel 2014-07-20

    OK, didn't know. I will code a custom section, thank you!

JSON Source