开发者

sencha touch :: how to handle long lists on iOS

in my sencha touch app I need to display a list of over 600 entries of objects per selected customer.

imagine one store holds some customers, displayed in a list. each of them has some "has-many"-related sub-stores, one holding about 600 objects (with urls, title, description...). these sub-info has to be listed when you select one customer from the first list.

the problem is on iOS you have to wait some seconds before the li开发者_如何学编程st is shown and it is very slow to scroll/use. it seems that it slows down the whole app.

are there any other options to display long lists, maybe like pagination ore something...

thnx!

edit: I found this article and will test these thoughts soon: Link

edit2: here we go: https://github.com/Lioarlan/UxBufList-Sench-Touch-Extension


You can paginate your list by adding a pageSize param to your store and the listpaging plugin to your list. By setting the autoPaging option, you can control whether the data is loaded automatically or on user click. Below is an example:

// store
Ext.regStore('BarginsStore', {
    model: 'BarginModel',
    autoLoad: true,
    pageSize: 6,
    clearOnPageLoad: false,
    sorters: 'category',
    getGroupString: function(record) {
        return record.get('category');
    }
});

// list
this.list = new Ext.List({
    store: 'BarginsStore',
    plugins: [{
        ptype: 'listpaging',
        autoPaging: true
    }],
    singleSelection: true,
    emptyText: '<p class="no-bargins">No bargins found matching this criteria.</p>',
    itemTpl: '<div class="bargin-record">{name}</div>'
});


are there any other options to display long lists, maybe like pagination ore something...

Pagination. Smartphones have far more limited CPU and RAM resources than a desktop PC. A six hundred row table with several elements is not going to display well on the devices on the market now. Hell, it'll probably slow down desktop browsers. Paginate it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜