Skip to content

Commit a7f94b9

Browse files
Fixing keyboard for android
1 parent 7df7051 commit a7f94b9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/KeyboardCompatibleView/KeyboardCompatibleView.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class KeyboardCompatibleView extends React.Component {
2121
static defaultProps = {
2222
behavior: Platform.OS === 'ios' ? 'padding' : 'position',
2323
enabled: true,
24-
keyboardVerticalOffset: 66.5, // default MessageInput height
24+
keyboardVerticalOffset: Platform.OS === 'ios' ? 86.5 : -300, // default MessageInput height
2525
};
2626

2727
_frame = null;
@@ -43,7 +43,6 @@ class KeyboardCompatibleView extends React.Component {
4343
}
4444

4545
const keyboardY = keyboardFrame.screenY - this.props.keyboardVerticalOffset;
46-
4746
// Calculate the displacement needed for the view such that it
4847
// no longer overlaps with the keyboard
4948
return Math.max(frame.y + frame.height - keyboardY, 0);

0 commit comments

Comments
 (0)