int[] location = new int[2];
TextView.getLocationOnScreen(location);
int x = location[0];
int y = location[1];
获取控件的位置 在加上字符在TextView中的偏移量就是字符的坐标了
public final void smoothScrollTo (int x, int y)
Since: API Level
1
Like scrollTo(int,
int), but scroll smoothly instead of immediately.
Parameters
xthe position where to scroll on the X axis
ythe position where to scroll on the Y axis