Menu bar can go outside the screen
Before 4.0.0:
After 4.0.0 :
Thanks for reporting this issue.
I can not reproduce this on my Pixel 8 pro, let me try to find some other devices to test 🤔 I've upgraded the compose version to the latest one, please try this again on https://github.com/firemaples/EverTranslator/releases/tag/v4.0.4 🙇♂️
Thanks for reporting this issue.
I can not reproduce this on my Pixel 8 pro, let me try to find some other devices to test 🤔 I've upgraded the compose version to the latest one, please try this again on https://github.com/firemaples/EverTranslator/releases/tag/v4.0.4 🙇♂️
I just tried latest version, didn't fix the problem
I think it only happens with old android versions 9 and 10 😅 these the one I use
I will try to use android studio to see if there's anything could help us
Update: I tried to use android emulator and the same problem happened
If we could add more logs to get what is wrong, might help us to find what made this problem
What I notched it can detect the left and right side of the screen
So I guess it can detect up and down of the screen but it can't detect if it's near to it ( what code is responsible for this? And how we could check that?
I use the compose built-in DropdownMenu now.
https://github.com/firemaples/EverTranslator/blob/7191b70fcb0cb8c20b3499fedb4b052187d6bc75/main/src/main/java/tw/firemaples/onscreenocr/floatings/compose/mainbar/MainBarMenu.kt#L16-L28
I thought it should be positioned inside of the scope by default.
Maybe it can not aware the scope on the views on WindowManager
The menu was a component that I calculated the position by myself on the previous version https://github.com/firemaples/EverTranslator/blob/b4a8b22aa1d856e6a5dbf06f43839105f96dd058/main/src/main/java/tw/firemaples/onscreenocr/floatings/menu/MenuView.kt#L101-L121
Looks like I need to use a customized component instead of a built-in one 😅
This might help:
https://github.com/material-components/material-components-android/blob/master/docs/components/Menu.md
Also what do you think of using Bottom sheets instead? https://github.com/material-components/material-components-android/blob/master/docs/components/BottomSheet.md
Thank you for the proposed components, let me try to find the relative compose component to use 👍