Disable Full Screen Keyboard on Landscape Screen

I’m new comer here. I have a textfield that need to input account and password. My screen in landscape mode but when input text, a full screen keyboard cover all the screen. Is there any way to hide this / (currently I only need it to work on android phones).

What device are you using?  The keyboard should not cover the whole screen.  Normally it’s your responsibility to scroll the fields into view.  With touch screen devices, the keyboard has to be visible for you to type.

Rob

MB623.png

I mean the keyboard and white text box cover all the screen. I want to have keyboard just like the portrait do. It show keyboard but the entire screen is the app/game screen but not textbox

both_keyboards.png

This is the default behavior for landscape apps on Android.  You can see this exact same behavior in other landscape Android apps as well.  It’s by Google’s design.  This is to ensure that the text field is visible on low resolution devices where the virtual keyboard takes up most of the screen.  Corona does not provide an API to change this behavior.

Thank for your answer, Joshua. However I saw that many app/game that only have keyboard with app/game screen in both landscape and portrait . When i find this problem on the internet that Android provide an options for disable full-screen keyboard on this link  http://stackoverflow.com/questions/4336762/disabling-the-fullscreen-editing-view-for-soft-keyboard-input-in-landscape

And the code is: 

@Override

public InputConnection onCreateInputConnection(EditorInfo outAttrs) {

outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI;

// etc.
}

Is there anyway Corona can deal with it?

Corona does not have an API to change the keyboard behavior as you have shown.  Our team is busy working on features that are much more highly demanded.  This is a rarely requested feature and odds are this is not going to get implemented.

What device are you using?  The keyboard should not cover the whole screen.  Normally it’s your responsibility to scroll the fields into view.  With touch screen devices, the keyboard has to be visible for you to type.

Rob

MB623.png

I mean the keyboard and white text box cover all the screen. I want to have keyboard just like the portrait do. It show keyboard but the entire screen is the app/game screen but not textbox

both_keyboards.png

This is the default behavior for landscape apps on Android.  You can see this exact same behavior in other landscape Android apps as well.  It’s by Google’s design.  This is to ensure that the text field is visible on low resolution devices where the virtual keyboard takes up most of the screen.  Corona does not provide an API to change this behavior.

Thank for your answer, Joshua. However I saw that many app/game that only have keyboard with app/game screen in both landscape and portrait . When i find this problem on the internet that Android provide an options for disable full-screen keyboard on this link  http://stackoverflow.com/questions/4336762/disabling-the-fullscreen-editing-view-for-soft-keyboard-input-in-landscape

And the code is: 

@Override

public InputConnection onCreateInputConnection(EditorInfo outAttrs) {

outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI;

// etc.
}

Is there anyway Corona can deal with it?

Corona does not have an API to change the keyboard behavior as you have shown.  Our team is busy working on features that are much more highly demanded.  This is a rarely requested feature and odds are this is not going to get implemented.

I would like to have this feature as well.  If there was just some way to “pass through” some properties, like:

addressField.imeOptions = “flagNoExtractUi”

and internally have it correlate to something like:

<EditText
android:id="@+id/addressField"
android:imeOptions=“flagNoExtractUi”
>
</EditText>

That would be helpful.  I understand about the priorities, though.

I would like to add to my above post that I would really, really, really like to have this feature.

I just had a meeting yesterday with the creative team and business partners where they picked apart everything in the app that was slightly different from the creative, so I already know they are going to give me a hard time about this, and my only excuse right now is that Corona SDK doesn’t support it.

Some context:

Thanks,

Dave

Dave,

I think we’re much more receptive to implementing this in the future now that Corona has a new experimental feature on Android which will pan/slide the app so that the text field being edited will always be in view.  In my opinion, this new experimental feature is needed since there is no means of obtaining the virtual keyboard height on Android and you’ll need to guarantee that the text field is visible when in landscape mode, which has very little screen real-estate.  Have a look at the link below to test out this new feature for yourself.

   http://forums.coronalabs.com/topic/50905-detect-keyboard-height/?p=272745

That said, I’m surprised your business partners has a problem with the way it works now since this is Android’s default behavior for phones in landscape mode.  You can see this behavior in other apps as well.  We very rarely get complaints about this behavior other than from those who are hard nosed in having Android apps behave more like iOS apps.  Wouldn’t an Android app that behaves more like other Android apps be better?  Or is there some other unique UI design that you’re going for?  Just asking out of interest.

Note:  I can’t promise that this will be done since it has to be a team decision on our end, but we have been actively trying to address Corona developers’ concerns on better text field handling.  So, this is a good time to bring text field related topics up.

The use case for this is pretty basic – it’s a “Find Dealers” screen where the user can type in an address or zip code and see a list of retailers near them in a list and plotted on a map.  Our app is currently locked in landscape mode (in order to meet a deadline), but we will support portrait and landscape mode eventually.

All my business partners have iPhones and iPads, so you’re right – they’ll expect it to work the same way as on iOS.  I have a few Android test devices, and I see that you’re right – almost every app opens the edit field in full screen when in landscape mode.  I can also tell there is very little space left on a small android device in landscape mode… Hmm…

We can get by with it going full screen for Android only… I can explain that it’s the system default, but I know they are going to find the exception, and say, “But, Google Play doesn’t go full screen when I tap in the Search field whether I’m in landscape mode or not… Why can’t we do it like that?”  And then I’m back to, “Well, because Corona SDK doesn’t support it.”  See what I mean?

I think I can make a good argument about the small screens and the tiny amount of space until they go, “Yes, but, can’t you detect if it’s a smaller device and only *then* go full screen?”  :-)

Thanks,

Dave

I would like to have this feature as well.  If there was just some way to “pass through” some properties, like:

addressField.imeOptions = “flagNoExtractUi”

and internally have it correlate to something like:

<EditText
android:id="@+id/addressField"
android:imeOptions=“flagNoExtractUi”
>
</EditText>

That would be helpful.  I understand about the priorities, though.

I would like to add to my above post that I would really, really, really like to have this feature.

I just had a meeting yesterday with the creative team and business partners where they picked apart everything in the app that was slightly different from the creative, so I already know they are going to give me a hard time about this, and my only excuse right now is that Corona SDK doesn’t support it.

Some context:

Thanks,

Dave

Dave,

I think we’re much more receptive to implementing this in the future now that Corona has a new experimental feature on Android which will pan/slide the app so that the text field being edited will always be in view.  In my opinion, this new experimental feature is needed since there is no means of obtaining the virtual keyboard height on Android and you’ll need to guarantee that the text field is visible when in landscape mode, which has very little screen real-estate.  Have a look at the link below to test out this new feature for yourself.

   http://forums.coronalabs.com/topic/50905-detect-keyboard-height/?p=272745

That said, I’m surprised your business partners has a problem with the way it works now since this is Android’s default behavior for phones in landscape mode.  You can see this behavior in other apps as well.  We very rarely get complaints about this behavior other than from those who are hard nosed in having Android apps behave more like iOS apps.  Wouldn’t an Android app that behaves more like other Android apps be better?  Or is there some other unique UI design that you’re going for?  Just asking out of interest.

Note:  I can’t promise that this will be done since it has to be a team decision on our end, but we have been actively trying to address Corona developers’ concerns on better text field handling.  So, this is a good time to bring text field related topics up.

The use case for this is pretty basic – it’s a “Find Dealers” screen where the user can type in an address or zip code and see a list of retailers near them in a list and plotted on a map.  Our app is currently locked in landscape mode (in order to meet a deadline), but we will support portrait and landscape mode eventually.

All my business partners have iPhones and iPads, so you’re right – they’ll expect it to work the same way as on iOS.  I have a few Android test devices, and I see that you’re right – almost every app opens the edit field in full screen when in landscape mode.  I can also tell there is very little space left on a small android device in landscape mode… Hmm…

We can get by with it going full screen for Android only… I can explain that it’s the system default, but I know they are going to find the exception, and say, “But, Google Play doesn’t go full screen when I tap in the Search field whether I’m in landscape mode or not… Why can’t we do it like that?”  And then I’m back to, “Well, because Corona SDK doesn’t support it.”  See what I mean?

I think I can make a good argument about the small screens and the tiny amount of space until they go, “Yes, but, can’t you detect if it’s a smaller device and only *then* go full screen?”  :-)

Thanks,

Dave