Skip to content

Commit

Permalink
Merge pull request #394 from Rexee/master
Browse files Browse the repository at this point in the history
Fix post-Lollipop shared elements transition animations
  • Loading branch information
Jawnnypoo authored Aug 1, 2016
2 parents 852bcc0 + 685fc7c commit 7c5b783
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 15 additions & 1 deletion library/src/main/java/uk/co/senab/photoview/PhotoView.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ public ScaleType getScaleType() {
return mAttacher.getScaleType();
}

@Override
public Matrix getImageMatrix() {
return mAttacher.getImageMatrix();
}

@Override
public void setAllowParentInterceptOnEdge(boolean allow) {
mAttacher.setAllowParentInterceptOnEdge(allow);
Expand Down Expand Up @@ -173,6 +178,15 @@ public void setImageURI(Uri uri) {
}
}

@Override
protected boolean setFrame(int l, int t, int r, int b) {
boolean changed = super.setFrame(l, t, r, b);
if (null != mAttacher) {
mAttacher.update();
}
return changed;
}

@Override
public void setOnMatrixChangeListener(OnMatrixChangedListener listener) {
mAttacher.setOnMatrixChangeListener(listener);
Expand Down Expand Up @@ -264,4 +278,4 @@ protected void onAttachedToWindow() {
init();
super.onAttachedToWindow();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,10 @@ private void cancelFling() {
}
}

public Matrix getImageMatrix() {
return mDrawMatrix;
}

/**
* Helper method that simply checks the Matrix, and then displays the result
*/
Expand Down

0 comments on commit 7c5b783

Please sign in to comment.