Har*_*560 5 android android-layout
我有一个textview,其中包含覆盖屏幕一半的长文本,
在这个文本视图中,我在上面的不同位置有两个单词,我必须放置一个空白的布局,这将给它一个玻璃效果.
我可以通过将textview放在framelayout中并将布局放在它上面来实现.
问题是如何获得单词的坐标,因为文本可能被安排在不同设备上的不同位置.

我想在标记为白色的地方放置一个布局.有人可以帮忙谢谢.
这会对你有帮助
Run Code Online (Sandbox Code Playgroud)public void getLocationOnScreen (int[] location) Since: API Level 1 Computes the coordinates of this view on the screen. The argument must be an array of two integers. After the method returns, the array contains the x and y location in that order. Parameters location an array of two integers in which to hold the coordinates
| 归档时间: |
|
| 查看次数: |
1895 次 |
| 最近记录: |