PDA

View Full Version : get the device screen width and heigth?



uhuru
31 Jan 2011, 1:14 AM
Hi. I need to know the size of the screen because I'm using a popup panel and I want its width to be the 90% of total width.

I've been looking for something on the touch API and i've tried with some "Ext.Element" methods like: Ext.Element.getOuterWidth()*0.9, Ext.Element.getViewportWidth()*0.9 , Ext.Element.getWidth()*0.9

I think I'm not looking in the right place.

Can anyone help? Thanks.

steve1964
31 Jan 2011, 1:18 AM
Just use javascript screen.width and screen.height...

uhuru
31 Jan 2011, 1:23 AM
getViewportWidth()*0.9 worked. The problem was a missing '}'. Can anyone delete this thread? Thanks!

sumon86
1 Jun 2011, 2:15 AM
I created the below datastore

Ext.regStore('Cart', {
model: 'Product',
//autoLoad: true,
proxy: {
type: 'sessionstorage',
id: 'shoppingcart'
}
});

I want to get the individual records from this datastore. I don't want to show in listview or other component. Please help me. I am very new to sencha touch.