Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13066] iOS: DashboardView disappears from ScrollableView

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-11-27T19:28:52.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 24, 2013 Sprint 24 API, Release 3.3.0
ComponentsiOS
LabelsDashboardView, i0S, module_dashboardview, qe-closed-3.3.0, qe-testadded
ReporterJanosch Sander
AssigneePedro Enrique
Created2013-03-08T11:43:55.000+0000
Updated2014-04-24T09:36:33.000+0000

Description

Problem description

A DashboardView disappears from a ScrollableView's page as soon as the page is out of cache.

Steps to reproduce

Follow these steps to reproduce: Use the following code:
var win = Ti.UI.createWindow();
var pages = [];
var dashboardData = [];

for (var i=0; i<9; i++){
    var item = Ti.UI.createDashboardItem({
        image: 'appicon.png'
    });
    dashboardData.push(item);
}

var dashboard = Ti.UI.createDashboardView({
    data: dashboardData,
    wobble: true,
    top: 100
});

for (var i=0; i<10; i++) {
    pages[i] = Ti.UI.createView({
        backgroundColor: '#fff'
    });
    pages[i].add(Ti.UI.createLabel({text: i}));
    if (i === 0) {
        pages[i].add(dashboard);
    }
}

var scroll = Ti.UI.createScrollableView({
    views: pages,
    cacheSize: 3
});

win.add(scroll);
win.open();
1. Swipe 2 times to the right 2. Swipe 2 times to the left Problem does not occur if cache size is increased to >= number of pages.

Attachments

FileDateSize
app.js2013-03-08T11:43:55.000+0000636
workaround.js2013-03-08T15:37:59.000+00001039

Comments

  1. Janosch Sander 2013-03-08

    Recreating the entire DashboardView in a scroll or scrollend eventlistener seems to be the only way to work around the issue from JS side. See attached workaround.js
  2. Pedro Enrique 2013-11-19

    PR pending https://github.com/appcelerator/titanium_mobile/pull/4995
  3. Paras Mishra 2014-04-24

    Verified as fixed, hence closing the issue. Verified on: Device : iPhone 5s , iOS version : 7.1.1 SDK: 3.3.0.v20140423155715 CLI version : 3.3.0-dev OS : MAC OSX 10.9.2 Alloy: 1.4.0-dev ACS: 1.0.14 npm:1.3.2 Appcelerator Studio, build: 3.3.0.201404211130 titanium-code-processor: 1.1.1-alpha XCode : 5.1.1

JSON Source