-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Positioning Issue: Tip Window appear to be more bottom on Android 11 #150
Comments
Android 8 and Android 10 cannot re-produce the issue, no matter what device it is. I guess the problem comes along with Android 11 (API 30) |
Facing the same issue on Google Pixel 2 XL (Android 11) Found any solution @samuelchou ? |
So I banged my head against this issue, it seems to only be happening on Android 11 (not on Android 12). Looks like you need to subtract the status bar height to get it aligned correctly.
|
Also, it looks like if the device has a notch/cut out, you need to compensate for its height as well. Based on the example above:
|
@zarsky When I tested out your method on a device with a notch the val metrics: WindowMetrics = activity.windowManager.currentWindowMetrics
val insets = metrics.windowInsets.getInsets(WindowInsets.Type.statusBars())
val statusBarHeight = insets.top |
Run the demo app on Google Pixel 5(Android 11) and you will see what similar to below. The ToolTip position seems to be more "bottom" than expected.
I'm sure that is not related to night theme, and not even related to gravity.
I don't know if this is related to Pixel (5) or Android 11, though.
The text was updated successfully, but these errors were encountered: