File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
lib/android/src/main/java/com/wix/reactnativeuilib/keyboardinput Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import android .content .Context ;
4
4
import android .view .View ;
5
+ import android .view .Window ;
5
6
import android .view .WindowManager ;
6
7
import android .view .inputmethod .InputMethodManager ;
7
8
import android .widget .EditText ;
@@ -166,11 +167,17 @@ private int getHeightForCustomContent() {
166
167
}
167
168
168
169
private void setKeyboardOverlayMode () {
169
- getWindow ().setSoftInputMode (WindowManager .LayoutParams .SOFT_INPUT_ADJUST_PAN );
170
+ Window window = getWindow ();
171
+ if (window != null ) {
172
+ window .setSoftInputMode (WindowManager .LayoutParams .SOFT_INPUT_ADJUST_PAN );
173
+ }
170
174
}
171
175
172
176
private void clearKeyboardOverlayMode () {
173
- getWindow ().setSoftInputMode (WindowManager .LayoutParams .SOFT_INPUT_ADJUST_RESIZE );
177
+ Window window = getWindow ();
178
+ if (window != null ) {
179
+ window .setSoftInputMode (WindowManager .LayoutParams .SOFT_INPUT_ADJUST_RESIZE );
180
+ }
174
181
}
175
182
176
183
private void sendCustomKeyboardResignedEvent () {
You can’t perform that action at this time.
0 commit comments