emojicon
emojicon copied to clipboard
Wrong popup height when the status bar is at the bottom
As the title says. Here's the fix:
private void calculateSizeForSoftKeyboard() {
...
if (resourceId > 0 && getTopStatusBarHeight() > 0) {
heightDifference -= mContext.getResources()
.getDimensionPixelSize(resourceId);
}
...
}
private int getTopStatusBarHeight() {
Rect rect = new Rect();
((Activity) mContext).getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
return rect.top;
}