Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13535] Android: TableView getMinRowHeight and setMinRowHeight not defined

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-05-15T21:11:21.000+0000
Affected Version/sRelease 3.0.2, Release 3.1.0
Fix Version/s2013 Sprint 10 API, 2013 Sprint 10, Release 3.2.0
ComponentsAndroid
Labelsmodule_animation, qe-testadded
ReporterMilt Grinberg
AssigneeSunila
Created2013-03-29T20:15:04.000+0000
Updated2014-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'

Discussions

Comments

  1. Jamie Buckley 2013-04-01

    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
  2. Milt Grinberg 2013-04-01

    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.
  3. Jamie Buckley 2013-04-01

    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
  4. Daniel Sefton 2013-04-12

    Tested and confirmed with Samsung Galaxy S2 Android 2.3.6, Ti SDK 3.0.2 GA and latest 3.1 CI.
  5. Sunila 2013-05-15

    Expose minRowHeight as a property accessor and update view when the property changes. https://github.com/appcelerator/titanium_mobile/pull/4271
  6. Allen Yeung 2013-05-15

    Test Case:
       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();
       
    Expected result: The min height should apply Actual Result: The errors appear in the log and the height doesn't apply.
  7. Anshu Mittal 2013-10-11

    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

JSON Source