Detect keyboard height

coronaWindowMovesWhenKeyboardAppears should be CoronaWindowMovesWhenKeyboardAppears when inside the iphone->plist table.  The lower case version is for the Android table.  Everything in the iphone->plist  is “Pascal cased”, that its it starts with a capital letter.  Android uses camelCase where the first letter is lower cased.

Rob

I don’t understand. When Corona can move the whole window up to exact Y location above keyboard, it means Corona is able to know the keyboard height, and make the adjustment accordingly. But why can’t Corona open up that API to let everyone know the keyboard height? 

Correct me if I am wrong, because I don’t know about the very details.

On Android, you cannot fetch the keyboard height.  We’ve discussed this at the beginning of this thread (page 1).  Instead, you tell the Android operating system to move your app for you via its “adjustPan” feature.

Hi All,

I want to make a list of most popular devices and their keyboard height. It would be great if everyone who has an Android Device  would check their keyboard height and place the result  here: https://docs.google.com/a/insys.pl/spreadsheets/d/1s9Pjrs7QoK-wJvqvzhGEI17wvrD3PS3jbRVEdrFWIu0/edit#gid=0

It is not perfect but it might help a little bit. Just take a screenshot of any app screen with keyboard open and mesure in px how tall it is. I will update all my devices till the end of the week. 

With this, we will have a good start for preparing lib to rerutn keyboard height for each device.

Maciej C: how would you like to handle different keyboards?

There are tons of them in the marketplace + you can set different height + you can have split keyboards etc…

I think you are wasting your time.

Hi All,

I want to make a list of most popular devices and their keyboard height. It would be great if everyone who has an Android Device  would check their keyboard height and place the result  here: https://docs.google.com/a/insys.pl/spreadsheets/d/1s9Pjrs7QoK-wJvqvzhGEI17wvrD3PS3jbRVEdrFWIu0/edit#gid=0

It is not perfect but it might help a little bit. Just take a screenshot of any app screen with keyboard open and mesure in px how tall it is. I will update all my devices till the end of the week. 

With this, we will have a good start for preparing lib to rerutn keyboard height for each device.

Maciej C: how would you like to handle different keyboards?

There are tons of them in the marketplace + you can set different height + you can have split keyboards etc…

I think you are wasting your time.

I’m trying to use the CoronaWindowMovesWhenKeyboardAppears options for both iOS & Android.

Initially I was using native.newTextField, but then I needed to change to native.newTextBox so I could have longer text entry.

The textBox appears to work fine on Android (it scrolls up and behaves pretty similarly to the textField). However, on iOS the scroll up is not working if I use a textBox. If I switch back to a textField it works.

It looks like the textBox implementation is supposed to work on both iOS and Android.

Is anyone else having problems for TextBoxes on iOS? Has something changed that might have made it fail?

Looks like I’m going to have to switch back to using a TextField on iOS unless this is fixed.

Note: currently using Version 2015.2675 (2015.7.7)

Same issue here. Also using a textbox. Tried giving the iOS panning a go but it isn’t working for me neither on device

This is an experimental feature and we know there are issues on iOS. I don’t know if textBoxes are supposed to be included or not.

Rob

I still can not understand why were not allowed to just get the keyboard height on iOS, when the alternative clearly isn’t even working. The panning feature sacrifices so much in the name of *one* solution that kind of works on all platforms.

How about one solution that works perfectly on iOS forever, and then whatever solution for Android on Android? Why isn’t it being implemented this way?

We try to keep Android and iOS platforms as close to possible and this is simply not something we can get on Android.

Rob

Is there a fix for this scheduled any time soon?

No. We won’t be adding support for this in the near future. It’s impossible to get this value on Android. This is why we introduced panning.

Sorry I meant to say a fix for the panning feature. Because we’d be able to go with anything if it would just work with textboxes. As for now though without the panning support, it just looks pretty bad and it’s difficult to design something that’ll work well.

Panning is fully operational on Android I believe. On iOS there are circumstances where it doesn’t work, the main one being on a multi-orientation app. So if you can do Portrait only or Landscape only, panning should work for you, though there may be a few other bugs.

Rob

We’re mainly having issues with it not working at all textbox. Our app is only in portrait mode and does not support multi-orientations. Yet with the panning implemented when we hit the textbox, it does not pan at all. This is on iOS.

I don’t know if we have it working with TextBoxes, and we have working on other things, it’s not something we will likely get to in the near future. Add it to a display group, scroll it to the top half of the screen.

Rob

Hello, is there a way to calculate the height that the screen moved up when panning to show the keyboard. I am implementing a chat feature and I would like to keep the back button at the very top when the keyboard slides up but the entire view moves up therefore moving the back button off the screen.

Also, native.newTextField pans for me but native.newTextBox() does not.

Correct. Only native.newTextField pans.  You can make your scrolling area small enough that it doesn’t go all the way to the top and have your back button bar stay on the screen.

Rob