[TIMOB-12658] Android: TableView row labels disappear, related to className property
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-04-10T20:50:10.000+0000 |
Affected Version/s | Release 2.1.4, Release 3.0.0, Release 3.1.0 |
Fix Version/s | 2013 Sprint 08 Core, 2013 Sprint 08, Release 3.2.0 |
Components | Android |
Labels | SupportTeam, core, module_tableview, qe-testadded |
Reporter | Daniel Sefton |
Assignee | Allen Yeung |
Created | 2013-02-09T07:18:17.000+0000 |
Updated | 2013-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();
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.
Can't reproduce on latest master
Was able to reproduce with Google Nexus 7-Android 4.1. Studio-3.0.2.201302191606 Titanium SDK-3.1.0.v20130320190115
It is a layout issue. If line 29 is commented out,
, the table view works fine. This issue does not happen on 2.0.2.GA.
Reproduced with 3.1.0 RC
https://github.com/appcelerator/titanium_mobile/pull/4137
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