Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25622] autoAdjustScrollViewInsets fails with extendEdges: [Ti.UI.EXTEND_EDGE_TOP]

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2018-01-15T10:11:18.000+0000
Affected Version/sRelease 6.3.0
Fix Version/sRelease 7.0.2
ComponentsiOS
Labelsios, merge-7.0.2, safearea
ReporterJason Kotchoff
AssigneeVijay Singh
Created2017-12-20T00:52:31.000+0000
Updated2018-01-23T22:10:42.000+0000

Description

The autoAdjustScrollViewInsets has stopped working when extendEdges: [Ti.UI.EXTEND_EDGE_TOP] is applied. This was working up until Ti SDK 6.2.2 and it stopped working from Ti SDK 6.3.0.GA onwards. It is still not fixed in the current SDK. This affects both ListView and TableView components. Refer to the test case below. The content is not correctly offset underneath the titlebar. The only workaround for the moment seems to be creating a 64dp tall 'spacer' view at the top of the list content. Hans mentioned a possibly related fix in AC-5301 (TIMOB-25332) however that fix does not resolve the test case below. Here is my sample code:
var win = Ti.UI.createWindow({
  title: "Listview test",
  barColor: "#cc0000",
  autoAdjustScrollViewInsets: true,
  extendEdges: [Ti.UI.EXTEND_EDGE_TOP],
  titleAttributes: {
    color: '#fff'
  },
  backgroundColor: '#fff'
});

var list = Ti.UI.createListView({
  sections: [Ti.UI.createListSection({
    items: [{ properties: { title: 'Test 1' } }, { properties: { title: 'Test 2' } }, { properties: { title: 'Test 3' } }, { properties: { title: 'Test 4' } }, { properties: { title: 'Test 5' } }, { properties: { title: 'Test 6' } }]
  })]
});

win.add(list);

var navwin = Titanium.UI.iOS.createNavigationWindow({
   window: win
});
navwin.open();

Attachments

FileDateSize
Screen Shot 2017-12-20 at 11.50.08 am.png2017-12-20T00:51:22.000+0000215761

Comments

  1. Vijay Singh 2018-01-04

    This issue is raised due to TIMOB-25334. There was a bug in iOS 11.0 , due to which this fix was applied. In iOS 11.2 this issue looks fixed from apple. So we have to revert it.
  2. Vijay Singh 2018-01-14

    Test case for TableView :
             var win = Ti.UI.createWindow({
             title: "Tableview test",
             barColor: "#cc0000",
             autoAdjustScrollViewInsets: true,
             extendEdges: [Ti.UI.EXTEND_EDGE_TOP],
             titleAttributes: {
               color: '#fff'
             },
             backgroundColor: '#fff'
           });
            var data = [{ title: 'Test 1' }, { title: 'Test 2' }, { title: 'Test 3' }, { title: 'Test 4' } ];
            var tableView = Ti.UI.createTableView({data : data});
           win.add(tableView);
           var navwin = Titanium.UI.iOS.createNavigationWindow({
              window: win
           });
           navwin.open();
       
  3. Vijay Singh 2018-01-15

    This issue is fixed in TIMOB-25646.

JSON Source