New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-26662] Android: TableViewRow bugs #10542
Conversation
Related to #4137 (TIMOB-12658) |
9012073
to
e8e08c8
Compare
android/modules/ui/src/java/ti/modules/titanium/ui/TableViewRowProxy.java
Show resolved
Hide resolved
...oid/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TiTableViewRowProxyItem.java
Outdated
Show resolved
Hide resolved
|
f520d3a
to
caa45df
Compare
Commits are rebased on
|
android/titanium/src/java/org/appcelerator/titanium/proxy/TiViewProxy.java
Outdated
Show resolved
Hide resolved
...oid/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TiTableViewRowProxyItem.java
Show resolved
Hide resolved
d49171a
to
58c21b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: PASS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: Pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drauggres When testing this PR against the following test case TableViewRow
height does not grow beyond the original size but it seems like TableViewRow.getRect()
return the correct value.
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();
Test Environment
MacOS Catalina 10.15.1 beta
Node.js 10.16.3
"NPM":"4.2.15-1","CLI":"7.1.2"
Google Pixel 7.1.1 Emulator
...oid/modules/ui/src/java/ti/modules/titanium/ui/widget/tableview/TiTableViewRowProxyItem.java
Outdated
Show resolved
Hide resolved
@ssjsamir Updated PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FR Passed: Using the test case mentioned above.
**Test environment*Test Environment
MacOS Catalina: 10.15.1 beta
Xcode: 11.3
Java Version: 1.8.0_131
Android NDK: 18.1.5063045
Node.js: 10.16.3
"NPM":"4.2.15-1","CLI":"7.1.2-7"
Pixel xl (7.1.1) Emulator
JIRA: https://jira.appcelerator.org/browse/TIMOB-26662
This PR fixes following bugs in TableViewRow:
TableViewRow.getRect()
always returns zeroesTableViewRow
height does not grow beyond original size (but can shrink)TableViewRowProxy