Skip to content
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

TextView中某个文字的坐标 #46

Open
Tom-xdf opened this issue Dec 3, 2023 · 2 comments
Open

TextView中某个文字的坐标 #46

Tom-xdf opened this issue Dec 3, 2023 · 2 comments

Comments

@Tom-xdf
Copy link

Tom-xdf commented Dec 3, 2023

通过触摸获取TextView中某个文字的坐标,显示该dialog,但是显示的位置不准确
image
image
image

@Tom-xdf
Copy link
Author

Tom-xdf commented Dec 4, 2023

根据用户按钮点击的坐标来确定弹窗位置,通过setOffsetx轴位置弹出有很大的偏差,甚至可以是位置全都不准确,只有通过setClickedPosition设置x轴的坐标上去,会有一点偏差,修改一下就好了,setClickedPosition的y轴坐标不生效,我把setClickedPositiony轴坐标设为0,然后再组合setOffsety轴的坐标来确定y轴的显示,但是坐标是写死的,动态设置偏差太大,写死的坐标在小尺寸屏幕和大尺寸屏幕适配没有问题 。
image

@Tom-xdf
Copy link
Author

Tom-xdf commented Dec 4, 2023

如果公司测试不为难的话,可以这样搞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant