PDA

View Full Version : SelectField behavior on PlayBook



demon_xxi
27 Mar 2011, 12:49 AM
Hello.

I'm trying to crate an application for BlackBerry playbook on sencha-touch.
As i understands it is very "smart" so tries to behave as native to each device as possible.

So when I try to use SelectField component it displays choices at the bottom of the screen.
But that one is not convenient. Users having whole tablet screen choose at the bottom of the screen in tiny panel :(

I'd like it to behave as in desktop browser with popup panel. See two screenshots I attached.

Is there any way to "force" component to behave as non mobile?

demon_xxi
27 Mar 2011, 12:58 AM
So far found the method:

showComponent: function() {
if (Ext.is.Phone) {
this.getPicker().show();
}
else {
var listPanel = this.getListPanel(),
index = this.store.findExact(this.valueField, this.value);

listPanel.showBy(this.el, 'fade', false);
listPanel.down('#list').getSelectionModel().select(index != -1 ? index: 0, false, true);
}
},

here if comment
if (Ext.is.Phone) {
this.getPicker().show();
}
then works as desired.

but why does PlayBook tablet handled as Phone ?!


So now question is how to override Ext.is.Phone value correctly for specific agenttype?