View Full Version : Is Sencha Touch usable on Android/Phonegap?

16 Apr 2011, 12:08 PM
I've been a user of Ext since the early days when it was called yui-ext so I am pretty familiar with the coding style.

I've spend the last two days simply trying to get some basic examples (copied directly from the Sencha documentation) to run on an Android emulator using Phonegap. For whatever reason, though, nothing seems to display correctly.

I just copied the Panel example code directly from the API doc page, so it is literally a Panel with a Title bar and a nav bar w/ a button. When I run the app, there are no errors but the display is mangled with the title bar being invisible, the panel body being invisible and the only thing displaying is the toolbar with a button which is not aligned correctly.

Additionally I've tried simply opening up an alert box and it's all squashed.

The only way I've gotten any layout to work is if the screen is already filled with HTML that makes the page height very tall. I'm assuming it could be some kind of height issue. I can find nothing in any examples to suggest what to do though.

I'm curious of anybody else is running this, I'm about to give up and go with something more lightweight because it's just not saving me any time at all, though I really am a fan of Sencha/Ext I don't want to be blazing the trail if this stuff just isn't working.

Thanks for any advice.

16 Apr 2011, 5:24 PM
It's very usable. I tested on actual devices and for the most part it's all good. Still some bugs, but you can find work arounds n

16 Apr 2011, 10:30 PM
It sounds like the sencha CSS file might not be getting pulled in.

Have you tried running your index.html in Safari or Chrome?

19 Apr 2011, 6:01 PM
i found the reason the layout was so messed up was because i was relying on the phonegap onDeviceReady event to start initializing components.

However they need to be created only after the Ext.setup 'onReady' event is fired. i added in that code and the layout seems to be working now.