PDA

View Full Version : a bug when a panel contains one carousel and one list



qlxww
25 Feb 2011, 12:15 AM
My example code is below:

Ext.setup({
icon: 'icon.png',
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
glossOnIcon: false,
onReady: function(){
Ext.regModel('Contact', {
fields: ['firstName', 'lastName']
});

var store = new Ext.data.JsonStore({
model: 'Contact',
sorters: 'lastName',

getGroupString: function(record){
return record.get('lastName')[0];
},

data: [{
firstName: 'Tommy',
lastName: 'Maintz'
}, {
firstName: 'Rob',
lastName: 'Dougan'
}, {
firstName: 'Ed',
lastName: 'Spencer'
}, {
firstName: 'Jamie',
lastName: 'Avins'
}, {
firstName: 'Aaron',
lastName: 'Conran'
}, {
firstName: 'Dave',
lastName: 'Kaneda'
}, {
firstName: 'Michael',
lastName: 'Mullany'
}, {
firstName: 'Abraham',
lastName: 'Elias'
}, {
firstName: 'Jay',
lastName: 'Robinson'
}]
});

var list = new Ext.List({
//fullscreen: true,

itemTpl: '{firstName} {lastName}',
grouped: true,
indexBar: true,

scroll: false,
store: store
});
var carousel = new Ext.Carousel({
defaults: {
cls: 'card',
align:'center'
},
items: [{
html: '1',
cls: 'card card1'
}, {
html: '2',
cls: 'card card2'
}, {
html: '3',
cls: 'card card3'
}]
});

var panel = new Ext.Panel({
fullscreen:true,
scroll: 'vertical',
layout: {
type: 'vbox',
align: 'stretch'
},
defaults: {
flex: 1
},
items: [carousel, list]
});

panel.show();
}
});

I test by iphone 3G and andoid sdk2.2, and find to scroll ineffectually after scrolling up one screen length. I seriously examine ,and find the colors of list's part is different,touch event is invalid when touching the below of different line.
Thanks a lot of the master's instruction.