Reputation: 5035
When deploying a simple Sencha Touch 2 app on a non-touch blackberry device (like Bold),
the webfield is showing about 6 pixels height of the content instead of 100% height.
there is a solution offered on this thread:
http://www.sencha.com/forum/showthread.php?151188-Blackberry-Webworks-Issues
However, when i added the code, nothing was changed.
Question: How does one solve this issue?
Disable mouse cursor and enable the default navigation style of non-touch BB devices in a sencha app. There is a solution offered here: http://resilientcoder.blogspot.co.il/2011/03/getting-sencha-touch-to-work-on-non.html unfortunately, looks like it was written for sencha touch 1, not 2. Question: is there a better solution? if not, how do i use this solution in the Commercial version of sencha touch (he mentions that his solution works only for the open source version)?
Upvotes: 2
Views: 834
Reputation: 5035
in the end, the solution presented @ http://www.sencha.com/forum/showthread.php?151188-Blackberry-Webworks-Issues worked for the screen size issue.
I only had to add the code blocks to my project's sdk viewport folder (and add the Blackberry.js file).
regarding my 2nd question, looks like there is no solution (as Lionel wrote)
Upvotes: 0
Reputation: 8069
(Saw your mail earlier this morning)
Back to the OP,
We have this issue solved by using following code. Same concept as from the source. We got our project ran on Blackberry Bold 9790 (Device), but not any of the simulator because it crashes when we write something to the file system.
(function() {
// Define a blackberry viewport
Ext.define('Ext.viewport.Blackberry', {
extend: 'Ext.viewport.Default',
constructor: function (config) {
// Blackberry does not like height: 100%
this.superclass.config.height = this.getWindowHeight() + 'px';
this.callParent([config]);
return this;
},
getWindowHeight: function () {
//Don't know why need to deduct by 120?!
return window.innerHeight-120;
}
});
// Insert a new Blackberry specific viewport
Ext.override(Ext.viewport.Viewport, {
constructor: function (config) {
return Ext.create('Ext.viewport.Blackberry', config);
}
});
})();
Then, you can create any component and supply a fullscreen: true
. It should takes up the whole viewport.
We have developed a similar app on BBOS 7+ and Sencha Touch 2, but we gave up the idea of having non-touch devices to work as stated by Sencha Touch team themselves, this is why Sencha Touch is called Sencha T O U C H and they won't support non-touch mobile devices.
This is quite terrible. We can't get it to work on non-touch devices so in the end we ditched the support on non-touch devices. I can't tell you what is our approaches as I can't remember the exact details on this issue. Roughly, I messed with sencha-touch-all-debug
in cheating Sencha that this code is running on a desktop so to simulate clicking, but Touch devices will then fails to work as the touches cannot be recognized as click. Something to do with event dispatches I would say. We spent almost a week to solve this problem, but gave up in the end. No solution so far. We just keep it to touch devices.
Upvotes: 3