Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12658] Android: TableView row labels disappear, related to className property

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-04-10T20:50:10.000+0000
Affected Version/sRelease 2.1.4, Release 3.0.0, Release 3.1.0
Fix Version/s2013 Sprint 08 Core, 2013 Sprint 08, Release 3.2.0
ComponentsAndroid
LabelsSupportTeam, core, module_tableview, qe-testadded
ReporterDaniel Sefton
AssigneeAllen Yeung
Created2013-02-09T07:18:17.000+0000
Updated2013-12-19T03:42:51.000+0000

Description

*Problem description* Labels added to TableView rows on Android seem to disappear/reappear when scrolling. With className commented, only one row ('Peaches') disappears, with className uncommented, only 'Peaches' appears. *Test case*
var win = Titanium.UI.createWindow({
	backgroundColor : '#fff'
});

var tableView = Ti.UI.createTableView({
	width : '80%',
	height : 100,
	borderColor : 'black',
	borderWidth : 1
});

win.add(tableView);

var listOptions = [ 'Apple', 'Orange', 'Mango', 'Peaches', 'Guava', 'Banana', 'Cherry' ];
var tableData = [];

for (var i = 0; i < listOptions.length; i++) {

	var row = Ti.UI.createTableViewRow({
		width : '100%',
		height : 40
		//,
		//className : 'drop_down_view_row'
	});

	var label = Ti.UI.createLabel({
		left : '10dip',
		width : '90%',
		height : '90%',
		text : listOptions[i],
		color : 'black'
	});

	row.add(label);
	tableData.push(row);
}

tableView.setData(tableData);

win.open();

Comments

  1. Soumya Kanti Kar 2013-02-11

    The tableview is also not working properly in 2.1.3GA. Not able to find the root cause. Even if we increase the number of records and then try to set the width and height of the table as 100% then also the issue remains. With className property set, only the first row that is not visibile initially is not displayed propery but gets displayed properly once the scrolling happens.
  2. Vishal Duggal 2013-03-19

    Can't reproduce on latest master
  3. Shubham Srivastava 2013-03-21

    Was able to reproduce with Google Nexus 7-Android 4.1. Studio-3.0.2.201302191606 Titanium SDK-3.1.0.v20130320190115
  4. Ping Wang 2013-03-22

    It is a layout issue. If line 29 is commented out,
    //height : '90%',
    , the table view works fine. This issue does not happen on 2.0.2.GA.
  5. Max Stepanov 2013-04-05

    Reproduced with 3.1.0 RC
  6. Allen Yeung 2013-04-10

    https://github.com/appcelerator/titanium_mobile/pull/4137
  7. Paras Mishra 2013-10-22

    Labels are visible when className property exists. Verified fix on: Device: Samsung Galaxy Note, Android version: 2.3.6 Device : Google Nexus 7, Android Version: 4.3 SDK: 3.2.0.v20131021142445 CLI version : 3.2.0 OS : MAC OSX 10.8.4 Alloy : 1.2.2 Appcelerator Studio, build: 3.2.0.201310181700 XCode : 5

JSON Source