[TIMOB-13535] Android: TableView getMinRowHeight and setMinRowHeight not defined
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-05-15T21:11:21.000+0000 |
| Affected Version/s | Release 3.0.2, Release 3.1.0 |
| Fix Version/s | 2013 Sprint 10 API, 2013 Sprint 10, Release 3.2.0 |
| Components | Android |
| Labels | module_animation, qe-testadded |
| Reporter | Milt Grinberg |
| Assignee | Sunila |
| Created | 2013-03-29T20:15:04.000+0000 |
| Updated | 2014-06-19T12:43:32.000+0000 |
Description
2. Problem
neither getMinRowHeight or setMinRowHeight seem to be defined for the android. Get the following error when call these method on a tableView
Test case
var table = Ti.UI.createTableView({})
try {
table.getMinRowHeight();
} catch (e) {
Ti.API.error('getMinRowHeight error:' + e)
}
try {
table.setMinRowHeight(10);
} catch (e) {
Ti.API.error('setMinRowHeight error:' + e)
}
Logs
getMinRowHeight error:TypeError: Object #<TableView> has no method 'getMinRowHeight'
setMinRowHeight error:TypeError: Object #<TableView> has no method 'setMinRowHeight'
Hi Milt, Please provide a simple test case that demonstrates this issue, Usually a simple app.js will suffice. Can you also provide: - The Titanium SDK version - The Titanium Studio version - Android Version
happens on android 2.3.6 Samsung charge phone. Titanium 3.0+ (doesn't seem to happen with Titanium 2.4+) Titanium Studio, build: 3.0.2.201302191606 (c) Copyright 2012-2013 by Appcelerator, Inc. All rights reserved. Build: jenkins-titanium-rcp-master-372 (origin/master) Date: 19 February 2013, 16:09:49 Don't you guys have any QA? I gave a simple explaination to illustrate this issue. I don't have time to create a small projects. All you need to do is create a Tableview and execute the methods against it and it will give you the error I showed.
Hi Milt, Please see this guide for how to properly submit a bug report. https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report
Tested and confirmed with Samsung Galaxy S2 Android 2.3.6, Ti SDK 3.0.2 GA and latest 3.1 CI.
Expose minRowHeight as a property accessor and update view when the property changes. https://github.com/appcelerator/titanium_mobile/pull/4271
Test Case:
Expected result: The min height should apply Actual Result: The errors appear in the log and the height doesn't apply.Ti.UI.backgroundColor = 'white'; var win = Ti.UI.createWindow(); var tableData = [ {title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'} ]; var table = Ti.UI.createTableView({ data: tableData }); try { table.getMinRowHeight(); } catch (e) { Ti.API.error('getMinRowHeight error:' + e) } try { table.setMinRowHeight(150); } catch (e) { Ti.API.error('setMinRowHeight error:' + e) } win.add(table); win.open();Verified fix with: Appc-Studio: 3.2.0.201310100354 Sdk:3.2.0.v20131010163242 alloy:1.2.2 npm:1.3.2 titanium:3.2.0 titanium-code-processor:1.0.3 Device:htc desire(4.1), iPhone5(7.0.2) Xcode: 5