// listview的y坐标 - 输入框的y坐标。
final int[] coord = new int[2];
int y2 = 0;
if (view != null) {
view.getLocationOnScreen(coord);
y2 = coord[1];
final int[] coord2 = new int[2];
mInput.getLocationOnScreen(coord2);
int y = coord2[1];
int commentViewHeight = view.getHeight();
distance = y2 - y + commentViewHeight;
}
移动scrollview的距离(上移)
int margin = -distance;
scrollView.setTranslationY(margin);