コード例 #1
0
 private void resetMatrix() {
   mMatrix.reset();
   checkMatrixBounds();
   DraweeView<GenericDraweeHierarchy> draweeView = getDraweeView();
   if (draweeView != null) {
     draweeView.invalidate();
   }
 }
コード例 #2
0
  public void checkMatrixAndInvalidate() {

    DraweeView<GenericDraweeHierarchy> draweeView = getDraweeView();

    if (draweeView == null) {
      return;
    }

    if (checkMatrixBounds()) {
      draweeView.invalidate();
    }
  }
コード例 #3
0
    @Override
    public void run() {
      if (mScroller.isFinished()) {
        return;
      }

      DraweeView<GenericDraweeHierarchy> draweeView = getDraweeView();

      if (draweeView != null && mScroller.computeScrollOffset()) {
        final int newX = mScroller.getCurrX();
        final int newY = mScroller.getCurrY();
        mMatrix.postTranslate(mCurrentX - newX, mCurrentY - newY);
        draweeView.invalidate();
        mCurrentX = newX;
        mCurrentY = newY;
        postOnAnimation(draweeView, this);
      }
    }