Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27863] Android: Parity on TableViewSection header titles between iOS and Android

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 9.0.1
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterSamir Mohammed
AssigneeGary Mathews
Created2020-04-23T14:02:51.000+0000
Updated2020-04-27T15:59:32.000+0000

Description

With the following test case below when doing a search in a TableView which uses TableViewSection the header title is shown in the search results on Android but not on iOS. Which results with a lot of empty sections on Android and is ultimately not needed. *Test Case:*
Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow();

  var section1 = Ti.UI.createTableViewSection({ headerTitle: '2.0.0' });
  section1.add(Ti.UI.createTableViewRow({ title: 'timob1000',hasChild: true, level: "acceptance" }));
  section1.add(Ti.UI.createTableViewRow({ title: 'timob1001',hasChild: true, level: "acceptance" }));
  section1.add(Ti.UI.createTableViewRow({ title: 'timob1004',hasChild: true, level: "acceptance" }));
  section1.add(Ti.UI.createTableViewRow({ title: 'timob1005',hasChild: true, level: "acceptance" }));
  section1.add(Ti.UI.createTableViewRow({ title: 'timob12148',hasChild: true, level: "acceptance" }));
  section1.add(Ti.UI.createTableViewRow({ title: 'timob16888',hasChild: true, level: "acceptance" }));

  var section2 = Ti.UI.createTableViewSection({ headerTitle: '2.1.1' });
  section2.add(Ti.UI.createTableViewRow({ title: 'timob1002',hasChild: true, level: "acceptance" }));
  section2.add(Ti.UI.createTableViewRow({ title: 'timob1003',hasChild: true, level: "acceptance" }));
  section2.add(Ti.UI.createTableViewRow({ title: 'timob1006',hasChild: true, level: "acceptance" }));
  section2.add(Ti.UI.createTableViewRow({ title: 'timob1007',hasChild: true, level: "acceptance" }));
  section2.add(Ti.UI.createTableViewRow({ title: 'timob1008',hasChild: true, level: "acceptance" }));

var search = Titanium.UI.createSearchBar({
		barColor: '#000',
		showCancel: true
	});

var table = Ti.UI.createTableView({
    data: [section1, section2],
    search: search
});

table.addEventListener('click', function(e){
    Ti.API.info(e.rowData.title);
    Ti.API.info(e.section.headerTitle);
});

win.add(table);
win.open();
*iOS:* !ios.png|thumbnail! *Android:* !android.png|thumbnail!

Attachments

FileDateSize
android.png2020-04-23T14:00:42.000+000057276
ios.png2020-04-23T14:00:08.000+0000123205

Comments

No comments

JSON Source