A Small Example for Sencha touch Carousel, How to Add Dynamic Items to the Carousel .
In the Below Code is the Carousel for 3 Items of Normal way of Writing in the Sencha Touch.
To add these above carousel Items Data Dynamically, add the initialize listeners and do Your Logic,
See the Following Sample Code.
In the Below Code is the Carousel for 3 Items of Normal way of Writing in the Sencha Touch.
Ext.create('Ext.Carousel',
{
fullscreen: true,
id: 'AddingDynamicItems',
items: [
{
html : 'Item 1',
},
{
html : 'Item 2',
},
{
html : 'Item 3'
}
]
});
To add these above carousel Items Data Dynamically, add the initialize listeners and do Your Logic,
See the Following Sample Code.
listeners:
{
'initialize':
function( me, eOpts ) {
for (i=1; i<=3; i++) {
me.add({
html : 'Item ' + i
//add your Logic.
});
}
}
}
No comments:
Post a Comment