示例#1
0
  private void invalidateAfterUpdate() {
    View view = mView.get();
    if (view == null) {
      return;
    }
    View parent = (View) view.getParent();
    if (parent == null) {
      return;
    }

    view.setAnimation(this);

    final RectF after = mAfter;
    computeRect(after, view);
    after.union(mBefore);

    parent.invalidate(
        (int) FloatMath.floor(after.left),
        (int) FloatMath.floor(after.top),
        (int) FloatMath.ceil(after.right),
        (int) FloatMath.ceil(after.bottom));
  }
示例#2
0
 private void prepareForUpdate() {
   View view = mView.get();
   if (view != null) {
     computeRect(mBefore, view);
   }
 }