Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-15646

Android: footerViews for sections in TableView disappear when sections have them too

    Details

      Description

      problem

      On Android, when creating a Ti.UI.TableView, if the TableView's and a TableViewSection's footerViews are both at the bottom of the table, the TableViewSections's footerView is not visible. It's not clear whether they are overalapping, or if the section's footerView is never rendered at all.

      test case

      var rowCtr = 0,
      	data = [];
       
      var win = Ti.UI.createWindow({
      	backgroundColor: '#fff',
      	fullscreen: false,
      	exitOnClose: true
      });
       
      var section = Ti.UI.createTableViewSection({
      	headerView: extraView('headerView', 'section'),
      	footerView: extraView('footerView', 'section')
      });
       
      genRows(4, data);
      genRows(4, section);
      data.push(section);
       
      var table = Ti.UI.createTableView({
      	data: data,
      	headerView: extraView('headerView', 'table'),
      	footerView: extraView('footerView', 'table')
      });
       
      win.add(table);
      win.open();
       
      function extraView(type, parent) {
      	return Ti.UI.createLabel({
      		text: parent + ' ' + type,
      		backgroundColor: parent === 'table' ? '#a00' : '#00a',
      		color: '#fff',
      		height: '40dp',
      		width: Ti.UI.FILL
      	});
      }
       
      function genRows(num, obj) {
      	var isSection = typeof obj.length === 'undefined';
      	for (var i = 0; i < num; i++) {
      		var row = Ti.UI.createTableViewRow({
      			title: (isSection ? 'section ' : '') + 'row ' + (++rowCtr)
      		});
       
      		if (!isSection) {
      			obj.push(row);
      		} else {
      			obj.add(row);
      		}
      	}
      }
      

      screenshots

      One screenshot shows the problem on Android. One screenshot shows the test case working properly on iOS.

        Attachments

          Activity

            People

            • Assignee:
              sunila Sunila
              Reporter:
              tlukasavage Tony Lukasavage
              Reviewer:
              Hieu Pham
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-17766
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code