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.
1 parent dc1c215 commit 260683eCopy full SHA for 260683e
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