We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
直接获取 RawX 和 RawY, 然后获取 TextView 在屏幕的位置,算出当前点击区域在 TextView 上的位置,最后用 getPreciseOffset 获取偏移量比较 OK, 这样也可以解决嵌套 TextView 宽度不和屏幕宽度相等,导致获取 x 坐标不准的问题。比如聊天的气泡,用 getHysteresisOffset 就无法实现划词的手势和背景 Span 重合。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
直接获取 RawX 和 RawY, 然后获取 TextView 在屏幕的位置,算出当前点击区域在 TextView 上的位置,最后用 getPreciseOffset 获取偏移量比较 OK, 这样也可以解决嵌套 TextView 宽度不和屏幕宽度相等,导致获取 x 坐标不准的问题。比如聊天的气泡,用 getHysteresisOffset 就无法实现划词的手势和背景 Span 重合。
The text was updated successfully, but these errors were encountered: