Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25258] Android: TableView bottom border extends past the last table row

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2017-10-04T18:06:52.000+0000
Affected Version/sRelease 6.2.0
Fix Version/sRelease 6.3.0
ComponentsAndroid
LabelsAndroid, consider-6.2.3, qe-6.2.0, regression
ReporterAbir Mukherjee
AssigneeJoshua Quick
Created2017-09-08T21:48:35.000+0000
Updated2017-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

FileDateSize
actual_bad.png2017-09-08T21:47:43.000+000027567
expected_good.png2017-09-08T21:47:24.000+000027420

Comments

  1. Joshua Quick 2017-09-09

    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).
  2. Joshua Quick 2017-09-11

    -PR (master):- https://github.com/appcelerator/titanium_mobile/pull/9421 _Edit: PR closed in favor of another PR. See comment below._
  3. David Fox 2017-09-20

    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!
  4. Gary Mathews 2017-09-28

    6_3_X: https://github.com/appcelerator/titanium_mobile/pull/9489
  5. Lokesh Choudhary 2017-10-02

    FR Passed for both master & 6.3.0 backport. PR's merged.
  6. Joshua Quick 2017-10-21

    [~lchoudhary], the fix for this on master has been moved to... PR (master): https://github.com/appcelerator/titanium_mobile/pull/9513
  7. Lokesh Choudhary 2017-10-23

    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
  8. David Fox 2017-11-30

  9. Joshua Quick 2017-11-30

    [~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!

JSON Source