public void offsetChildrenTopAndBottom(int offset, int position) {
final int count = getChildCount();
for (int i = 0; i < count; i++) {
final View v = getChildAt(i);
int top = v.getTop();
top += offset;
int bottom = v.getBottom();
bottom += offset;
v.layout(v.getLeft(), top, v.getRight(), bottom);
invalidate();
}
}
将此child 移动offset距离,然后更新界面