PDA

View Full Version : [OPEN-327] List with carousel



gmanraj
20 Sep 2010, 11:22 AM
Sencha Touch: The following code is working in 0.93, but not in 0.95 (this is not tested with 0.94). Please fix it.

onReady: function()
{
var carousel = new Ext.Carousel({
width: 320, height: 150,
hidden: true
});

carousel.add({ html: '<img src="images/1.jpg">' });
carousel.add({ html: '<img src="images/1.jpg">' });
carousel.add({ html: '<img src="images/1.jpg">' });


var list = new Ext.List({
width: 320, height: 417,

items: [
{
items:[


{ html: '<span><strong>One</strong></span>' },
carousel,

]
},
{ html: '<span><strong>Two</strong></span>' },
{ html: '<span><strong>Three</strong></span>' },
{ html: '<span><strong>Four</strong></span>' },
{ html: '<span><strong>Five</strong></span>' }
],
listeners:
{
itemtap: function (cmp, idx, elmt, evt)
{
console.log(elmt);

carousel.show();
carousel.doLayout();
list.doLayout();
},
scope: this
}
});

var panel = new Ext.Panel({
fullscreen: true,
items: [ list]
});
}



The above codes are sample to test this feature. Expected screen will look like the following/attached image:
22487

In 0.95 the carousel does not appear, it expends item with carousel height but empty carousel (no images & no indicators). when i change the SDK version to 0.93 then it works fine.

Please, give me an idea to implement this feature.

Thanks,
Manraj

BrendanC
22 Sep 2010, 10:43 AM
Thanks for the bug report.

aconran
22 Sep 2010, 3:23 PM
Are you looking for individual items to expand out and then show the carousel so that they can swipe through the tires?

gmanraj
22 Sep 2010, 9:07 PM
Yes, exactly. But only one item should be expanded at a time. For example, "Two" will expand at the same time "One" or expanded item other then "Two" will hide the carousel.

Thanks.

gmanraj
1 Oct 2010, 5:47 AM
Hi Aaron,

It seems to be not fixed in the 0.96. can I get any idea to create this layout/page, that is list with carousel (carousel will be a sub item in each list item)?

jimmylam
26 Nov 2010, 8:32 AM
Hi, is this bug fixed in 1.0? I want this layout too, but I can't find any ideas about it...

gmanraj
26 Nov 2010, 9:10 AM
I am so sorry Jimmylam. I have not time to check this in the version of 1.0. I will check it tomorrow and will update it.

jimmylam
27 Nov 2010, 11:27 PM
I am so sorry Jimmylam. I have not time to check this in the version of 1.0. I will check it tomorrow and will update it.

hi gmanraj, Thanks for your replied. Have you checked it? And is this layout worked correct in 0.9.3?

gmanraj
29 Nov 2010, 8:22 PM
Yes, this is working in 0.93.