Objects pushed upwards

Hi guys,
I just made a sample text box to show what happens when i press on it on a samsung s8. I understand that its aspect ratio is unusually different, however it seems this is the only device that it occurs on (both ios and android); just wondering if theres a way to keep the object static in this case?

Cheers,
Boris

the build.settings content: 

– For more information on build.settings, see the Project Build Settings guide at:

https://docs.coronalabs.com/guide/distribution/buildSettings

settings =

{

orientation =

{

– Supported values for orientation:

– portrait, portraitUpsideDown, landscapeLeft, landscapeRight

default = “portrait”,

supported = { “portrait”, },

},

– Android section

android =

{

coronaWindowMovesWhenKeyboardAppears = false,

usesPermissions =

{

“android.permission.INTERNET”,

},

},

– iOS section

iphone =

{

xcassets = “Images.xcassets”,

plist =

{

UIStatusBarHidden = false,

UILaunchStoryboardName = “LaunchScreen”,

},

},

– Plugins section

plugins =

{

},

– Project section

excludeFiles =

{

– Exclude unnecessary files for each platform

all = { “Icon.png”, “Icon-*dpi.png”, “Images.xcassets”, },

android = { “LaunchScreen.storyboardc”, },

},

}

main.lua content:

local defaultField

local function textListener( event )

    if ( event.phase == “began” ) then

        – User begins editing “defaultField”

    elseif ( event.phase == “ended” or event.phase == “submitted” ) then

        – Output resulting text from “defaultField”

        print( event.target.text )

    elseif ( event.phase == “editing” ) then

        print( event.newCharacters )

        print( event.oldText )

        print( event.startPosition )

        print( event.text )

    end

end

– Create text field

print(“NBAX”)

defaultField = native.newTextField( 150, 150, 180, 30 )

defaultField:addEventListener( “userInput”, textListener )

config.lua content:

application =

{

content =

{

width = 320,

height = 480, 

scale = “letterbox”,

fps = 60,

–[[

imageSuffix =

{

    ["@2x"] = 2,

    ["@4x"] = 4,

},

–]]

},

}

You might need to enable the s8 tall mode. See this post:

https://forums.coronalabs.com/topic/70798-enabling-samsung-s8-full-screen-mode/

Rob

Hi Rob,

forgot that this thread existed lol. i came across with a solution and that is to include display.setStatusBar(display.LightTransparentStatusBar) before any objects are loaded. it works most of the time (sometimes the objects ignore the status bar at the top).  the objects being pushed upwards ( some into the status bar ) can also be seen in other apps including Facebook Messenger on the S8 so im not sure if this is a definitive solution.

cheers

the build.settings content: 

– For more information on build.settings, see the Project Build Settings guide at:

https://docs.coronalabs.com/guide/distribution/buildSettings

settings =

{

orientation =

{

– Supported values for orientation:

– portrait, portraitUpsideDown, landscapeLeft, landscapeRight

default = “portrait”,

supported = { “portrait”, },

},

– Android section

android =

{

coronaWindowMovesWhenKeyboardAppears = false,

usesPermissions =

{

“android.permission.INTERNET”,

},

},

– iOS section

iphone =

{

xcassets = “Images.xcassets”,

plist =

{

UIStatusBarHidden = false,

UILaunchStoryboardName = “LaunchScreen”,

},

},

– Plugins section

plugins =

{

},

– Project section

excludeFiles =

{

– Exclude unnecessary files for each platform

all = { “Icon.png”, “Icon-*dpi.png”, “Images.xcassets”, },

android = { “LaunchScreen.storyboardc”, },

},

}

main.lua content:

local defaultField

local function textListener( event )

    if ( event.phase == “began” ) then

        – User begins editing “defaultField”

    elseif ( event.phase == “ended” or event.phase == “submitted” ) then

        – Output resulting text from “defaultField”

        print( event.target.text )

    elseif ( event.phase == “editing” ) then

        print( event.newCharacters )

        print( event.oldText )

        print( event.startPosition )

        print( event.text )

    end

end

– Create text field

print(“NBAX”)

defaultField = native.newTextField( 150, 150, 180, 30 )

defaultField:addEventListener( “userInput”, textListener )

config.lua content:

application =

{

content =

{

width = 320,

height = 480, 

scale = “letterbox”,

fps = 60,

–[[

imageSuffix =

{

    ["@2x"] = 2,

    ["@4x"] = 4,

},

–]]

},

}

You might need to enable the s8 tall mode. See this post:

https://forums.coronalabs.com/topic/70798-enabling-samsung-s8-full-screen-mode/

Rob

Hi Rob,

forgot that this thread existed lol. i came across with a solution and that is to include display.setStatusBar(display.LightTransparentStatusBar) before any objects are loaded. it works most of the time (sometimes the objects ignore the status bar at the top).  the objects being pushed upwards ( some into the status bar ) can also be seen in other apps including Facebook Messenger on the S8 so im not sure if this is a definitive solution.

cheers