emojicon icon indicating copy to clipboard operation
emojicon copied to clipboard

Wrong popup height when the status bar is at the bottom

Open cridus opened this issue 9 years ago • 0 comments

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;
}

cridus avatar Sep 12 '15 18:09 cridus