Touch not working fully on Android

I detected a problem with touch when running an app on different Android units with larger screen than 480x320px.
When running a landscape orientated app with a button/image at the right edge of the screen, touch did not respond at until I reached a bit in to the screen, pretty much same distance as screen is extended on a wider screen 45px on each side (Galaxy Tab on windows simulator).
On the left side it was no problem at all. I also have tried this on real devices with the same result. Desire HD, Galaxy S2 and Galaxy Tab 10.1.

The button is a button = display.newGroup() with an image in it.
I added printouts in eventhandler to make sure I did not miss anything but the event was not called at all when it was not responding.

In short touch outside 480px (x-axis) in landscape mode does not seem to work.

config.lua regarding screen size and scaling looks like this.
[lua] width = 320,
height = 480,
scale = “letterbox”,[/lua]

and landscape mode in build.settings.
[import]uid: 73836 topic_id: 17068 reply_id: 317068[/import]

This could be a simulator-specific bug regarding positioning of the skins, etc. I suggest you file a bug report to ensure this gets resolved at some point:

http://developer.anscamobile.com/content/bug-submission

To save on typing you could just give a brief description and a link to this thread. Bugs with test-cases attached (small example project that isolates the problem) tend to get resolved quicker than others (after it’s been prioritized).

Also, I suggest you build for device to see if this is an on-device issue as well because that would definitely elevate it’s priority.

Thank you very much, [import]uid: 52430 topic_id: 17068 reply_id: 64101[/import]

Ok, I can submit a bug report.

Regarding it to be simulator specific I actually mentioned earlier that I got the same behaviour on real devices like Desire HD, Galaxy S2 and Galaxy Tab 10.1

Update:
I was making a small example for the bug report and discovered that this was actually a director 1.4 related problem when I was stripping down the code.
Corona SDK itself had no issue.
[import]uid: 73836 topic_id: 17068 reply_id: 64250[/import]

found it myself, thanks!

for anyone interested facing the same issue:

[lua]local _W = display.contentWidth
local _H = display.contentHeight


– Rectangle

local protection = display.newRect( -_W, -_H, _W * 3, _H * 3 )
protection:setFillColor( 255, 255, 255 )
protection.alpha = 0.01
protection.isVisible = false
protectionView:insert( protection )


– Listener

local fncProtection = function( event )
return true
end
protection:addEventListener( “touch”, fncProtection )
protection:addEventListener( “tap”, fncProtection )[/lua]

you need to adjust _W and _H
[import]uid: 90610 topic_id: 17068 reply_id: 66254[/import]

In what way did you need to adjust _W and _H? I dont quite understand what the solution is.

I have the same original problem as stated above on 2 different devices. [import]uid: 43692 topic_id: 17068 reply_id: 70788[/import]

I added a method to the director class:

[lua]–====================================================================–
– SET PROPER WIDTH AND HEIGHT
–====================================================================–
function setDimension(width, height)
_W = width;
_H = height;
end;[/lua]

in my main class, i calculate the correct dimension of the display and then set it in the director class. [import]uid: 90610 topic_id: 17068 reply_id: 70791[/import]

For anyone that might not understand the above comment, you can do the following

replace

[lua]local _W = display.contentWidth
local _H = display.contentHeight[/lua]

with

[lua]local _W = (math.ceil(math.abs(display.screenOriginX)) * 2) + display.contentWidth
local _H = (math.ceil(math.abs(display.screenOriginY)) * 2) + display.contentHeight[/lua] [import]uid: 50514 topic_id: 17068 reply_id: 77517[/import]