View Full Version : Drawing Issue on Android

2 Mar 2011, 4:29 AM
Hi all,

I have a small example here:

var list = new Ext.List({
width: undefined,
height: undefined,
onItemDisclosure: function(record, btn, index) {
Ext.Msg.alert('Tap', window.innerWidth + ' x ' + window.innerHeight + ' - Your choice was ' + record.get('entry'), Ext.emptyFn);
itemTpl: '<div class="contact"><strong>{entry}</strong></div>',
store : store

var image = new Ext.Panel({
width : window.innerWidth,
html: "<img src='images\/ph.png' width=\"" + window.innerWidth + "\">"

var rootpanel = new Ext.Panel({
fullscreen : true,
layout: {
type: 'vbox',
align: 'stretch',
pack: 'start'
dockedItems : [ toolbar ],
items: [image, list]

ehmm the list is filled with some values and the image shall displayed above the list ... so far so good ... in the browser (google chrome) anything is fine but on my android device it seams that the screen is not realy redrawed on start up ... the list is so close to the image that only about 15 pixels are shown of the image ... the rest is coverd by the list ... but when i turn the device into landscape and back to portrait any thing is fine after that action ...

yea i hope anyone understand me ... is there an funktion of panel to redraw anything with right dimensions and positions ?

thanks for your help.

2 Mar 2011, 4:45 AM
I think it's the doComponentLayout() method that you want.

2 Mar 2011, 5:32 AM
thanks for the fast reply ...

ehmm I'm a sencha touch noob so I try to call this method on the rootpanel but nothing changed -.- is this the right spot to call it ?

Did you or anyone else know how the redrawing on change from landscape to portrait work ?

2 Mar 2011, 6:33 AM
ehmm sorry another stupid question ... is there any other way, with more controls, to insert an image ?