this seems to give me the correct return for orientation change:-
var previousOrientation = 0;
var checkOrientation = function(){
if(window.orientation !== previousOrientation){
previousOrientation = window.orientation;
ice.log.debug(ice.log, "WINDOW ORIENTATION HAS CHANGED!!");
alert("orientation has changed!");
resizeElementHeight('#
{cc.id}
');
}
};
window.addEventListener("resize", checkOrientation, false);
window.addEventListener("orientationchange", checkOrientation, false);
....the only problem is that it doesn't handle resize (which I don't think should apply to mobile devices, but we should probably have for desktop browsers....can you think of any reason why they should be used for mobile devices???
Anyways, the problem now is that I am not that familiar with composite components and I am only getting one of my scroller panels to change their dimenstion/size (not the menu panel).
Once this is a component and not a composite component, if the mobile devices don't require a resize, we can just write these scripts based on that.
This works on the iPad as well as the android tablet (even though the menu is not being resized properly for the android tablet, I suspect it is my lack of knowledge regarding composite components and that iPad is doing it's own thing) for some reason the android is just wrapping the entire block of code into one panel and resizing it whereas the composite component still has 2 scrolling panels on the iPad (strange!).
This is a known issue with Honeycomb. Scrolling behaves properly with HW acceleration turned on. A preference has been added to android container to toggle HW acceleration on/off. While turning it on solves this problem, HW acceleration displays a number of other idiosyncrasies.