Skip to content
This repository was archived by the owner on Apr 2, 2018. It is now read-only.

Commit 4682535

Browse files
committed
Merge pull request #69 from fernandopg/master
Fix virtual keyboard size with status bar on Android
2 parents 386adc9 + 73a6d27 commit 4682535

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
.DS_Store
2-
*.sw[mnpcod]
2+
*.sw[mnpcod]

src/android/IonicKeyboard.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void onGlobalLayout() {
3838
//r will be populated with the coordinates of your view that area still visible.
3939
rootView.getWindowVisibleDisplayFrame(r);
4040

41-
int heightDiff = rootView.getRootView().getHeight() - (r.bottom - r.top);
41+
int heightDiff = rootView.getRootView().getHeight() - (r.bottom);
4242
int pixelHeightDiff = (int)(heightDiff / density);
4343
if (pixelHeightDiff > 100 && pixelHeightDiff != previousHeightDiff) { // if more than 100 pixels, its probably a keyboard...
4444
appView.sendJavascript("cordova.plugins.Keyboard.isVisible = true");

0 commit comments

Comments
 (0)