[TIMOB-25258] Android: TableView bottom border extends past the last table row
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-10-04T18:06:52.000+0000 |
Affected Version/s | Release 6.2.0 |
Fix Version/s | Release 6.3.0 |
Components | Android |
Labels | Android, consider-6.2.3, qe-6.2.0, regression |
Reporter | Abir Mukherjee |
Assignee | Joshua Quick |
Created | 2017-09-08T21:48:35.000+0000 |
Updated | 2017-11-30T20:30:34.000+0000 |
Description
*Description*
On Android, TableView borders should border around the rows with no gap as seen in the "expected" picture. There bottom border extends past the last row. This is a regression. SDK 6.1.2.GA works as expected. 6.2.0 fails.
*Steps to reproduce*
1. Create a Classic app and replace the code with the following below.
*Expected results*
See the attached screen shot. The border should wrap around the rows with no empty space between the last row and the bottom border.
*Actual results*
The bottom border is extended past the last row. See the screenshot "actual"
*app.js*
var window = Ti.UI.createWindow();
var rows = [];
for (var i = 0; i < 5; i++) {
var row = Ti.UI.createTableViewRow({});
row.add(Ti.UI.createView({
width: 100,
height: 50,
left: 0,
backgroundColor: 'blue',
borderWidth: 1,
borderColor: '#000'
}));
rows.push(row);
};
var table = Ti.UI.createTableView({
data: rows,
borderWidth: 1,
borderRadius: 30,
borderColor: 'blue',
rowHeight: 50,
top: 100,
left: 100,
right: 100,
height: Ti.UI.SIZE
});
window.add(table);
window.open();
Attachments
File | Date | Size |
---|---|---|
actual_bad.png | 2017-09-08T21:47:43.000+0000 | 27567 |
expected_good.png | 2017-09-08T21:47:24.000+0000 | 27420 |
I have verified that this bug was introduced after adding RefreshControl support in 6.2.0. The Android "RefreshLayout" Java class (which is now a parent of Titanium's TableView and ListView views) ignores the Android "WRAP_CONTENT" setting for height (ie: Titanium's Ti.UI.SIZE setting).
-PR (master):- https://github.com/appcelerator/titanium_mobile/pull/9421 _Edit: PR closed in favor of another PR. See comment below._
This is a pretty bad bug I think. When I compile my app in any 6.2.x version the ListView is rendered unusable because all of the auto-height items take up tons of extra space. I'm hoping that PR can be merged soon - thanks!
6_3_X: https://github.com/appcelerator/titanium_mobile/pull/9489
FR Passed for both master & 6.3.0 backport. PR's merged.
[~lchoudhary], the fix for this on master has been moved to... PR (master): https://github.com/appcelerator/titanium_mobile/pull/9513
Verified the fix in SDK 7.0.0.v20171023120246 & 6.3.0.v20171018084007. Closing. Studio Ver: 4.10.0.201709271713 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.10-2 Appc CLI: 6.3.0-master.15 Ti CLI Ver: 5.0.14 Alloy Ver: 1.10.6 Node Ver: 7.10.1 Java Ver: 1.8.0_101 Devices: ⇨ google Nexus 5 --- Android 6.0.1 ⇨ google Pixel --- Android 7.1.1
[~dfoxinator], as far as we know, all auto-sizing issues are fixed. If you're running into problems, then can you write up a new JIRA ticket please and attach a reproducible case? Thanks!