We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5278250 + 260683e commit f394746Copy full SHA for f394746
utilcode/src/main/java/com/blankj/utilcode/util/KeyboardUtils.java
@@ -124,7 +124,7 @@ private static int getContentViewInvisibleHeight(final Activity activity) {
124
final View contentView = activity.findViewById(android.R.id.content);
125
Rect r = new Rect();
126
contentView.getWindowVisibleDisplayFrame(r);
127
- return contentView.getBottom() - r.bottom;
+ return contentView.getRootView().getHeight() - (r.top - r.bottom);
128
}
129
130
/**
0 commit comments