android - Force Orientation on certain pages -


i'm developing phonegap + jsmobile + html5 app ios , android. i'd force landscape orientation same pages. i'm trying find solution can't it. possible @ all?

i found post says use trick in css rotate #div:

#id { -webkit-transform:rotate(90deg); /* safari , chrome */ } 

this trick rotates page rendered with border on left , right side.

i found solution:

$(document).on('pagebeforeshow', '#id',function() {                         settimeout(function() {                                   $('head').append( '<meta name="viewport" content="width=device-height, height=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;">' );                                   }, 200);                        }); 

the timeout prevent strange change in prev page ;)


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -