I have kind of a weird issue. I’m using webPopUp and am in landscape orientation. What is happening is when I load the webPopUp, the html page I’m loading is loading in portrait mode. When i rotate the device to the other landscape, the content automatically adjusts and then fits properly. Rotate back, and it still fits properly. Just the initial loading of the html content is thinking it’s in portrait mode for some reason. Very odd. And to make things worse, i’m only getting this on the iPhone, but on the iPad, it works great!
So is there a way to force the device to switch orientations and then back to kind of “refresh”? I don’t know. I can’t think of anything else at this point.
Here’s my code if someone is brave enough to take a stab at it. Thanks in advance.
[code]
module(…, package.seeall)
local widget = require(“widget”)
widget.setTheme(“theme_ios”)
local director = require “director”
function new()
localGroup = display.newGroup()
local myText = display.newText("", centerX, centerY, native.systemFont, 50)
myText:setTextColor(255, 255, 255)
myText.text = “click here for Africa Photos Page”
myText.size = 60
localGroup:insert(myText)
local function goToFlickr ()
native.showWebPopup( screenLeft,screenTop, display.contentWidth, display.contentHeight-36,
“http://m.flickr.com/photos/awana_international/6059839284/lightbox/”,
{urlRequest=listener} )
end
function localGroup:clean()
native.cancelWebPopup()
_G.webPopup = false
end
myText:addEventListener( “tap”, goToFlickr)
return localGroup
end [import]uid: 90878 topic_id: 19919 reply_id: 319919[/import]
