question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect popup height

See original GitHub issue
  • Version of the library: emoji-google or emoji-ios
  • Affected devices: Mi8, Poco F1
  • Affected versions: 0.5.1

For some reason Utils.screenHeight(Activity context) returns display height size that is lower by 220 from real parameters. I was able to fix it, by modifying screenHeight method to

static int screenHeight(@NonNull final Activity context) {
    final Point size = new Point();

    context.getWindowManager().getDefaultDisplay().getSize(size);

+    if (Build.VERSION.SDK_INT >= JELLY_BEAN_MR1) {
+
+    WindowManager windowManager =
+            (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
+    Display display = windowManager.getDefaultDisplay();
+    Point screenResolution = new Point();
+    display.getRealSize(screenResolution);
+
+    return screenResolution.y;
+    }
+
    return size.y;
  }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ZeD73commented, Jan 5, 2019

Confirmed this on emulators, seems that incorrect popup height problem only with full screen gestures in MIUI and maybe OxygenOS roms. For now it can be resolved by decreasing screen size with navigation bar height. return screenResolution.y - navigationBarHeight(context);

  static int navigationBarHeight(Activity context) {
    int resourceId = context.getResources().getIdentifier("navigation_bar_height", "dimen", "android");
    if (resourceId > 0) {
      return context.getResources().getDimensionPixelSize(resourceId);
    }
    return 0;
  } 

But I will try to provide more reliable solution.

0reactions
vanniktechcommented, Jan 15, 2019

I think this is related to #191 and overall the popup code has some rough edges. Hence, I’m folding this issue into the other one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

popup height problem - Forums - CSS-Tricks
i am creating/designing a popup for my website. my files are located here: popup.html. when the page open, theres a link at the...
Read more >
Incorrect popup height in DropDownList with LESS themes
Bug report The height of the DropDownList popup is incorrect when using LESS themes. Regression introduced with version 2022.1.119.
Read more >
Popup - The position is incorrect when using contentRender ...
If I use contentRender and width and height are 'auto', Popup calculates its position wrongly. Steps to reproduce: Click on Details button.
Read more >
Change height of popup window - Stack Overflow
You can set height and width of your popup window by using window.resizeTo(preferedWidth, preferedHeight) function.
Read more >
Very strange problem with sizing a Popup - MSDN - Microsoft
It almost looks like it's clipped - about two thirds of the popup is clipped in height (width is always fine).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found