Can you explain in more detail how the positioning is different between iOS and Android? Is it just a few pixels, or is the difference completely off? How did you configure your content area in “config.lua”? Can you include a screenshot showing the visible difference?
I’ve got a webview positioned at y=10 within a group, and this one positioned at y=700 within the scrollview.
Both the simulator and in Android devices I can see the webview positioned at the right place (y=710), but not in the iOS dev (iPad) where I see the webview at y=10
I’ve read because native webviews are not part of the OpenGL canvas, they do not obey the Corona display object hierarchy, but I don’t understand why only in iOS devices is happening this and I wondering if you are working to solve this issue.
I’ll probably need to see some of your code to determine what’s happening here. As you stated, native objects can’t technically be inserted into display groups, but it’s odd that the issue only seems to happen on iOS. So, if you can post some of your code (only the parts that are relevant, not the entire file please), I may be able to figure out what’s going on.
I’m not so sure about Android but AFAIK webViews and other native iOS components can not interact with OpenGL objects, that might be what’s causing it?
I think the issue is that the “scale” setting of “none” is no longer supported. You should choose either “letterbox”, “zoomEven”, or “zoomStretch” and set up a proper, multi-platform content area/region according to this guide…
I know I must adjust this to watch well on Android devices but I don’t understand one thing: I suppose if I change the config.lua as you tell me (according to the guides you tell me), anything will change on the Android devices, but in the simulator I’m getting the behaviour I desire, so, how your suggest could help to see in the iOS device the behaviour of the simulator?
local anchoVisible,altoVisible = display.viewableContentWidth,display.viewableContentHeight
[/lua]
To this?
[lua]
local anchoVisible,altoVisible = display.contentWidth,display.contentHeight
[/lua]
And report what happens.
Also, I don’t understand your second question. Which “view” are you using in the Simulator? All of the popular iOS devices are available to simulate, under “Window > View As”… but I don’t think that’s what you’re asking about.
About my question is because I don’t know exactly if you are trying the iOS device has the same behaviour than the simulator (that’s what I need) or viceversa.
Can you explain in more detail how the positioning is different between iOS and Android? Is it just a few pixels, or is the difference completely off? How did you configure your content area in “config.lua”? Can you include a screenshot showing the visible difference?
In regards to “native” objects like the WebView, sometimes they will appear differently on the device compared to the Simulator. This is just the nature of native objects, especially between Android and iOS. To be assured that your native objects appear in the correct position, you should always test on the device… the Simulator does its best to position these, but it’s not always 100% accurate.
I’ve got a webview positioned at y=10 within a group, and this one positioned at y=700 within the scrollview.
Both the simulator and in Android devices I can see the webview positioned at the right place (y=710), but not in the iOS dev (iPad) where I see the webview at y=10
I’ve read because native webviews are not part of the OpenGL canvas, they do not obey the Corona display object hierarchy, but I don’t understand why only in iOS devices is happening this and I wondering if you are working to solve this issue.
Ok, I understand I must test on the devices, but in this case in the iPad the webview is placed in one position and in the Android tablet is placed in the right place (the same as simulator), so my first thought is that it must be possible to solve the issue in the iPad.
The questions are: is really possible?, and how can I do this?
Moreover, what’s about the example we were trying?
I’ll probably need to see some of your code to determine what’s happening here. As you stated, native objects can’t technically be inserted into display groups, but it’s odd that the issue only seems to happen on iOS. So, if you can post some of your code (only the parts that are relevant, not the entire file please), I may be able to figure out what’s going on.