[TIMOB-26662] Android. TableViewRow bugs
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-02-12T10:37:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.0.0 |
Components | Android |
Labels | android, engSchedule, tableViewRow |
Reporter | Sergey Volkov |
Assignee | Gary Mathews |
Created | 2018-12-17T11:13:52.000+0000 |
Updated | 2020-02-12T10:37:32.000+0000 |
Description
Currently on Android TableViewRow:
always returns zeroes for
always returns zeroes for getRect
method (and rect property
)
does not grow in height beyond original size (but can shrink)
win = Ti.UI.createWindow({
backgroundColor: '#AAAAFF',
layout: 'vertical'
});
var top = Ti.UI.createView({
backgroundColor: '#FFAAAA',
layout: 'horizontal',
height: Ti.UI.SIZE,
width: Ti.UI.FILL
});
var btnPlus = Ti.UI.createButton({title: '+'});
btnPlus.addEventListener('click', function() {
console.log('plus click');
view.height += 50;
});
var btnMinus = Ti.UI.createButton({title: '-'});
btnMinus.addEventListener('click', function() {
console.log('minus click');
view.height -= 50;
});
var label = Ti.UI.createLabel();
var tableView = Ti.UI.createTableView();
var row = Ti.UI.createTableViewRow({
height: Ti.UI.SIZE,
width: Ti.UI.FILL
});
var view = Ti.UI.createView({
height: 150,
backgroundColor: 'blue'
});
row.add(view);
tableView.setData([ row ]);
tableView.addEventListener('postlayout', function onPostLayout() {
console.log('postlayout', row.rect.height, view.rect.height);
label.text = [row.rect.height, view.rect.height].join(' | ');
});
top.add(btnPlus);
top.add(btnMinus);
top.add(label);
win.add(top);
win.add(tableView);
win.open();
https://github.com/appcelerator/titanium_mobile/pull/10542
Hello, Thanks for the PR. Our engineers will look into it. Moving to TIMOB.
PR: https://github.com/appcelerator/titanium_mobile/pull/11187
[~s.volkov], while I'm fine with your PR's crash fix and getRect() change, I'm concerned that deleting the following code will bring back the bug mentioned in [TIMOB-16048].
I'm guessing that the fix for [TIMOB-16048] should have been made in our
ImageView
code instead. Regardless, it'll need to be re-tested and that's the only thing blocking this PR. (It may be better to split this issue into separate tickets/PRs anyways.)master: https://github.com/appcelerator/titanium_mobile/pull/10542
*Closing ticket*, fix verified in SDK version
9.0.0.v20200211122336
. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/10542