sencha touch 2制作滑动DataView(无缝list)

Ext.define('App.view.Sections', {
    extend: 'Ext.dataview.DataView',
    xtype: 'sectionslist',
    id: 'mainlist',

    requires: [
        'App.store.Sections',
    ],

    config: {
        store:'Sections' ,

        //itemTpl: '<div>{name} is {id} years old</div>'

        //height: 205,

        scrollable: 'vertical',

        /*  inline: {
         wrap: false
         },*/

        //set the itemtpl to show the fields for the store
        itemTpl: '<div style="text-align: center"><img src="http://assets.en.oreilly.com/1/eventprovider/1/_@user_93485.jpg"><div>{name} {age}</div></div>',
        listeners: {
            itemtap: function(nestedList, list, index, target,record,e,eOpts) {
                //var id = record.get('items');
                alert('1');


            },
            activeitemchange:function(comp, activeRecord, oldRecord){
                alert('2');
            }
        }

    }

});

效果:


posted @ 2013-08-30 11:10  范永强  阅读(164)  评论(0编辑  收藏  举报