Ejemplo n.º 1
0
 private void resetMatrix() {
   mMatrix.reset();
   checkMatrixBounds();
   DraweeView<GenericDraweeHierarchy> draweeView = getDraweeView();
   if (draweeView != null) {
     draweeView.invalidate();
   }
 }
Ejemplo n.º 2
0
  public void checkMatrixAndInvalidate() {

    DraweeView<GenericDraweeHierarchy> draweeView = getDraweeView();

    if (draweeView == null) {
      return;
    }

    if (checkMatrixBounds()) {
      draweeView.invalidate();
    }
  }
Ejemplo n.º 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);
      }
    }