fix: getRealScrollY() return unreal scroll y

This commit is contained in:
hyb1996 2018-02-21 23:27:11 +08:00
parent 6ca73623a2
commit 66cf6dbbf8

View File

@ -192,9 +192,7 @@ public class CodeEditText extends AppCompatEditText {
}
private int getRealScrollY() {
int scrollY = mScrollView.getScrollY();
View parent = (View) mScrollView.getParent();
return scrollY + parent.getScrollY();
return mScrollView.getScrollY() + getScrollY();
}
@Override