Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1341] hiding table view headerView and/or footerView leaves huge gap

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:55:55.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsiOS
Labelsn/a
ReporterNolan Wright
AssigneeBlain Hamon
Created2011-04-15T02:49:54.000+0000
Updated2011-04-17T01:55:55.000+0000

Description

from customer:

http://helpdesk.appcelerator.net/tickets/2915">http://helpdesk.appcelerator.net/tickets/2915

code to reproduce - just run app, then scroll to see huge gap. if the headerView is visible that display is correct:



var window = Titanium.UI.createWindow({backgroundColor:'#fff'});

//----------------------------------------------------------------------------------------------------

var hasRefineSearch = false;
var refineSearchParameters = null;
var searchFailed = true;

var isBuy = true;
var isGeolocated = false;
var locationString = "UB8";
var geoLocation = "";
var uniqueID = ""

//----------------------------------------------------------------------------------------------------

var propertiesFrom = 1;
var clickForMorePropertiesRow;
var numberOfRowsInTable = 0;
var foundProperties = 0;
var lastRow = null;
var tableview;
var totalPropertiesFound = 0;
var headerView = null;
var footerView = null;
//----------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------
var foundPropertiesLabel;

function createInfoRow() {
    headerView = Ti.UI.createView({height:64, width:320, backgroundColor:'#005500'}); 
    var headerViewBackground = Ti.UI.createImageView({height:56, top:0, width:320, backgroundColor:'#330066'}); 
    headerView.add(headerViewBackground);
    headerView.hide();
}


var remainingPropertiesLabel;

function createClickMoreRow() {
    footerView = Ti.UI.createView({height:52,width:320, backgroundColor:'#000066'}); 
    var footerViewBackground = Ti.UI.createImageView({height:42, top:10, width:320, backgroundColor:'#550066'}); //
    footerView.add(footerViewBackground);

    
    footerView.hide();
}

//----------------------------------------------------------------------------------------------------

function getPropertiesData() {
            
    var row = Ti.UI.createTableViewRow({height:78, hasChild:true, backgroundColor:'#660000'}); 
    tableview.appendRow(row);
}

//----------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------


function createPropertyTable() {
    createInfoRow();
    createClickMoreRow();
    
    tableview = Titanium.UI.createTableView({top:0, style:Titanium.UI.iPhone.TableViewStyle.PLAIN, backgroundColor:'transparent', headerView:headerView,footerView:footerView, data:[{title:'row 1'},{title:'row 2'}] });
    
    window.add(tableview);
}

//----------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------

createPropertyTable();
//getPropertiesData();
window.open();

Comments

  1. Nolan Wright 2011-04-15

    this was fixed in 1.4

JSON Source