Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3193] Android: setting a view to tableView.footerView after setData is not available only on Android

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-03-05T22:16:55.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsapi
ReporterStudioHitori
AssigneeBiju pm
Created2011-04-15T03:39:10.000+0000
Updated2017-03-30T22:12:22.000+0000

Description

It's impossible to set a footer view to tableView after setting row data only on Android as following:

var footerView = Ti.UI.createLabel({
  text: "Add Row",
  height: 60
});
tableView.footerView = footerView; // This works on both iPhone and Android.
tableView.setData(rowData);
tableView.footerView = footerView; // This wokrs only on iPhone.

Comments

  1. StudioHitori 2011-04-15

    I forgot to write version info. I use Titanium mobile ver 1.6RC1 and Android ver 2.2.

  2. Junaid Younus 2012-08-31

    Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120830102513, issue still valid.
       var win = Ti.UI.createWindow({backgroundColor: 'white'});
       
       var label = Ti.UI.createLabel({text: 'add row', height: 60, backgroundColor: 'red'});
       
       var tableData = [{title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'}];
       
       var tableView = Ti.UI.createTableView();
       win.add(tableView);
       
       //tableView.footerView = label;
       tableView.setData(tableData);
       tableView.footerView = label;
       
       win.open();
       
  3. Biju pm 2014-01-06

    PR :- https://github.com/appcelerator/titanium_mobile/pull/5187
  4. Hieu Pham 2014-03-05

    Can not reproduce with latest master
  5. Lee Morris 2017-03-30

    Closing ticket as I am unable to reproduce the issue using the following environment; Pixel (7.1) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80

JSON Source