Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Foldable devices
Started by ertocosta Apr 29 2019 02:37 PM

- - - - -
4 replies to this topic
fold foldable responsive device detect

Best Answer roaminggamer , 29 April 2019 - 07:02 PM

Have you tried the resize() event?  It may not work, but I think that is the event that is suited to the need.

 

https://docs.coronalabs.com/api/event/resize/index.html

-- Called when the app's view has been resized
local function onResize( event )
   print( "I got a resize event -- BOOYA!" )
end
 
-- Add the "resize" event listener
Runtime:addEventListener( "resize", onResize ) 

I'm not sure how you'd want to respond to it, but you can at least check it is thrown.

 

If it is NOT thrown, you probably need to file a feature request.  It may not happen right away however since the engineers would probably have to buy a device and invest a bit of time working out how to detect this. 

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

ertocosta

[GLOBAL: userInfoPane.html]
ertocosta
  • Observer

  • 4 posts
  • Corona SDK

Hello!!

 

what is the best way to detect size changes in folding devices (Galaxy Fold)?
 
Is CoronaSDK able to somehow detect that the size of the screen has changed and warn via eventListener?
 
Thanks!


[TOPIC: post.html]
#2

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 2,108 posts
  • Corona SDK

I really wouldn't worry about this....


  • agramonte likes this

[TOPIC: post.html]
#3

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,586 posts
  • Corona SDK

  Best Answer

Have you tried the resize() event?  It may not work, but I think that is the event that is suited to the need.

 

https://docs.coronalabs.com/api/event/resize/index.html

-- Called when the app's view has been resized
local function onResize( event )
   print( "I got a resize event -- BOOYA!" )
end
 
-- Add the "resize" event listener
Runtime:addEventListener( "resize", onResize ) 

I'm not sure how you'd want to respond to it, but you can at least check it is thrown.

 

If it is NOT thrown, you probably need to file a feature request.  It may not happen right away however since the engineers would probably have to buy a device and invest a bit of time working out how to detect this. 


  • dalekirkwood likes this

[TOPIC: post.html]
#4

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 976 posts
  • Corona SDK

Interesting question! Not very important at the moment, but it will lead to interesting changes in game design in the next few year, I assume.



[TOPIC: post.html]
#5

ertocosta

[GLOBAL: userInfoPane.html]
ertocosta
  • Observer

  • 4 posts
  • Corona SDK

 

roaminggamer is right!

 

Possibly Corona SDK interpret screen size changes as "resize" eventListener

 

I still do not own a foldable device to test.

 

Thank you guys!




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: fold, foldable, responsive, device, detect