Skip to content

Conversation

@fakenickels
Copy link

I had some issues on Android and I could solve them with these fixes.

The issues were:

  1. Keyboard flickering when tapping in one input (keyboard goes up) then tapping another input (keyboard goes down).
  2. After solving that 1. happened that when tapping in one input then tapping another one the first one was getting focused again right after.

Tell if I need to do something before merging. And thanks for the awesome package!

<ScrollView
ref='_rnkasv_keyboardView'
keyboardDismissMode='interactive'
keyboardShouldPersistTaps={true}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change isn't needed because you can pass keyboardShouldPersistTaps through KeyboardAwareScrollView props.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I just put it as default! But I can remove

@alvaromb
Copy link
Collaborator

alvaromb commented Jun 6, 2016

Hello @grsabreu!

Thanks for this PR. I've added some feedback to your code. I will try to test and integrate this as soon as possible.

@fakenickels
Copy link
Author

Thanks for the feedback! Sorry about the delay on replying

@alvaromb
Copy link
Collaborator

Can you rebase against master & squash your commits?

@fakenickels
Copy link
Author

Ok! I'll do that ASAP

@fakenickels fakenickels force-pushed the hook-to-android-keyboard-events branch from 395e813 to 7ac2217 Compare June 27, 2016 13:07
@fakenickels
Copy link
Author

@alvaromb just finished what you proposed and pushed, tell me if anything else is needed
Thanks

@evollu
Copy link
Contributor

evollu commented Jul 21, 2016

@alvaromb any updates on this?

const _KAM_KEYBOARD_OPENING_TIME = 250
const _KAM_EXTRA_HEIGHT = 75

const isAndroid = () => Platform.OS === 'android'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to:

const isAndroid = Platform.OS === 'android'

It's not necessary to run the function every time you need to check if it's Android or not.

@alvaromb
Copy link
Collaborator

Hi @grsabreu @evollu!

Sorry for the delay. I would like @grsabreu to check the comments about the code I've just left. I would really like to merge this as soon as possible.

Thanks!

@sarovin
Copy link

sarovin commented Aug 4, 2016

The props contentInset work only on IOS

@sarovin
Copy link

sarovin commented Aug 4, 2016

You can use this:

<ScrollView //...props> {this.props.children} <View style={{ height: this.state.keyboardSpace }} /> </ScrollView>

https://github.com/sarovin/react-native-scrollview-smart/blob/master/lib/ScrollViewSmart.js

@fakenickels
Copy link
Author

ok! I'll check the comments and update the PR ASAP

@fakenickels
Copy link
Author

Closed in favor of #71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants