Closed npomfret closed 8 years ago
You should be able to use the topSpacing
attribute to account for the auto correct bar.
I haven't actually tested this module with android, nor used react-native with android yet so I can't advise on how to get the auto correct bar height.
I would look on stack overflow for answers, if you do get it working PRs are always welcome
Can't quite work it out, but no big deal. Thanks anyway
I've got the same problem, Android is important, but I cannot figure how to connect this SO answer: http://stackoverflow.com/questions/13534365/getting-the-dimensions-of-the-soft-keyboard on how to get soft keyboard size to this library.
@SudoPlz Using that answer you would need to write some android native code, then link the getHeight API to react-native so its exposed as a javascript API.
Once you've done that you can hook into onToggle
on this component where you would set topSpacing
to the difference of the component height and what is returned by the exposed getHeight
API.
It's definitely not an ideal solution; the new keyboard module in v0.3.0 of this module may handle this as well I'd check that first before going through all that work.
I'll try and get my hands on an android device so I can solve this problem in a simplistic way.
Thanks for this component, very nice.
I'm using it to do some positioning of a absolute element in android. There's a auto correct bar on the top of the keyboard which doesn't seem to be accounted for in the Y direction. The result is that my component appears slightly under the keyboard. Any idea how to find out the height of the auto correct bar?