TiISRefreshControl icon indicating copy to clipboard operation
TiISRefreshControl copied to clipboard

Doesn't work inside a SplitWindow

Open sindresorhus opened this issue 12 years ago • 4 comments

When I try to drag the list down to see the refreshcontrol it just releases the list immediately which makes it impossible to drag it down enough to refresh.

Test case:

function createWin() {
    var win = Ti.UI.createWindow();

    var list = Ti.UI.createListView({
        refreshControlEnabled: true
    });

    list.addEventListener('refreshstart', function () {
        setTimeout(function () {
            list.refreshFinish();
        }, 1000);
    });

    win.add(list);

    return win;
}

var win = Ti.UI.iPad.createSplitWindow({
    detailView: createWin(),
    masterView: Ti.UI.createWindow()
});

win.open();

Using https://github.com/k0sukey/TiISRefreshControl/commit/d22dbde1e536841e05cf3b9edd1db8b38442f421

sindresorhus avatar Sep 09 '13 09:09 sindresorhus

I fixed. I think cause that's the same as #3.

k0sukey avatar Sep 09 '13 14:09 k0sukey

No, it's still an issue. You have to be in landscape on the iPad simulator to see it. Try dragging the listview down.

sindresorhus avatar Sep 09 '13 15:09 sindresorhus

OK, I was confirmed in iPad on landscape. Give me time.

k0sukey avatar Sep 09 '13 15:09 k0sukey

I think the behavior of the ListView and TableView when SplitWindow is rotated is wrong to. Of course, without this module. I think it can be avoided in this code.

var detail = Ti.UI.createWindow();
var list = Ti.UI.createListView();
detail.add(list);

var split = Ti.UI.iPad.createSplitWindow({
  masterView: Ti.UI.createWindow(),
  detailView: detail
});
split.open();

Ti.Gesture.addEventListener('orientationchange', function(){
  list.applyProperties({
    height: Ti.Platform.displayCaps.platformHeight
  });
});

k0sukey avatar Sep 12 '13 01:09 k0sukey