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:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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);
But I will try to provide more reliable solution.
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.