Transitioning with native keyboard movement

I’ve been messing with this for ages, trying to get an object to move up in perfect time with the native keyboard. It’s soooo close but the slightest bit out.

Has anyone managed to get the transition type, time, etc.  perfectly mimicking it’s movement?  If you have would you care to share your formula?  :smiley:

I tried this a bit and then gave up. Noticed that even if you time it perfectly one one device its is different on another one. In my case, I have an iPhone 4 and an iPad Mini and find the response time for keyboard to be different. Then there is the Android where performance differences across many thousands of device types are likely to be more pronounced. I am curious to see if you can ensure consistency across device types. Thanks for bringing this up. Very interesting topic. 

Oh gosh I hadn’t thought there would be inconsistencies between the apple hardware, usually they are very consistent!  I had just tested it on my iphone 5 for now… Oh well may have to just make do with close-enough!  It’s not really the time it’s more the easing in the transition must be perfect or they sort of modulate as they move up together.

Yup. I think how native functions respond via calls to underlying OS differ from one CPU class to another. It might even be different on the same device depending on how busy it is. To test, if you have it near perfect on your iPhone 5 do a power off and restart, clearing all memory and stuff and test again. See if the keyboard pop up is a little faster now. 

I see what you mean about the movement method as opposed to just worrying about timing. See my code sample posted in the link below mimicking the IOS Mail App when you hit the search bar. 

http://forums.coronalabs.com/topic/41908-lets-work-together-to-build-a-nice-searchbar-sample-app/

It is not optimized for the visual effect but it works and is close enough for me for now. Would be interested in how you tackle this if you don’t mind sharing. Thanks much!!!

The keyboards are different relative heights on the iPad and the iPhone and I’m sure orientation impacts it as well.    On the phone, it’s about 50% of the screen size. On the iPad its more like 25% and the distance to transition the keyboard up from the bottom is most likely varying because of this.  I can’t be 100% for sure but that seems to make the most sense.

Rob

^^ Very good point. You are indeed right! 

I tried this a bit and then gave up. Noticed that even if you time it perfectly one one device its is different on another one. In my case, I have an iPhone 4 and an iPad Mini and find the response time for keyboard to be different. Then there is the Android where performance differences across many thousands of device types are likely to be more pronounced. I am curious to see if you can ensure consistency across device types. Thanks for bringing this up. Very interesting topic. 

Oh gosh I hadn’t thought there would be inconsistencies between the apple hardware, usually they are very consistent!  I had just tested it on my iphone 5 for now… Oh well may have to just make do with close-enough!  It’s not really the time it’s more the easing in the transition must be perfect or they sort of modulate as they move up together.

Yup. I think how native functions respond via calls to underlying OS differ from one CPU class to another. It might even be different on the same device depending on how busy it is. To test, if you have it near perfect on your iPhone 5 do a power off and restart, clearing all memory and stuff and test again. See if the keyboard pop up is a little faster now. 

I see what you mean about the movement method as opposed to just worrying about timing. See my code sample posted in the link below mimicking the IOS Mail App when you hit the search bar. 

http://forums.coronalabs.com/topic/41908-lets-work-together-to-build-a-nice-searchbar-sample-app/

It is not optimized for the visual effect but it works and is close enough for me for now. Would be interested in how you tackle this if you don’t mind sharing. Thanks much!!!

The keyboards are different relative heights on the iPad and the iPhone and I’m sure orientation impacts it as well.    On the phone, it’s about 50% of the screen size. On the iPad its more like 25% and the distance to transition the keyboard up from the bottom is most likely varying because of this.  I can’t be 100% for sure but that seems to make the most sense.

Rob

^^ Very good point. You are indeed right!