From a589ad24bfe1832cb6e729cc521fdf2e59579d78 Mon Sep 17 00:00:00 2001 From: Hojjat Date: Sat, 13 Apr 2019 17:30:01 +0430 Subject: [PATCH 1/3] fix .gitignore file --- .gitignore | 1 + .idea/caches/build_file_checksums.ser | Bin 585 -> 0 bytes .idea/codeStyles/Project.xml | 29 ---------------------- .idea/encodings.xml | 6 ----- .idea/gradle.xml | 19 -------------- .idea/misc.xml | 34 -------------------------- .idea/modules.xml | 10 -------- .idea/runConfigurations.xml | 12 --------- .idea/vcs.xml | 6 ----- 9 files changed, 1 insertion(+), 116 deletions(-) delete mode 100644 .idea/caches/build_file_checksums.ser delete mode 100644 .idea/codeStyles/Project.xml delete mode 100644 .idea/encodings.xml delete mode 100644 .idea/gradle.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/runConfigurations.xml delete mode 100644 .idea/vcs.xml diff --git a/.gitignore b/.gitignore index 39fb081..fc83475 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /local.properties /.idea/workspace.xml /.idea/libraries +/.idea .DS_Store /build /captures diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser deleted file mode 100644 index 20e79e40dfc821a8c2a40c55c6e1ef4c881af8ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 585 zcmZ4UmVvdnh`~NNKUXg?FQq6yGexf?KR>5fFEb@IQ7^qHF(oHeub?PDD>b=9F91S2 zm1gFoxMk*~I%lLNXBU^|7Q2L-Ts|(GuF1r}uGBYr_F>vMNC#JY1CYR(Fc`|U8WE775b= zo+OZeVY&(#>KNES3X>)=U68m|dtc~{$Kyh-;L;KXft>v0#2ip)6{HrGWTqCE!WHMt z-ucTc?t)MPw|Z-9j@`-<22K6Y;?$yI{luKI#G?G99DS$-`iL;cFy)GD&&_^@O)M`P zIA^^1;Z#?`AXJr~pIfPq-GzsXeyba3ot}8)=Ir!!nw5qn41#zJ-_jc=eC=z;qu3L{ j4_t4gt^@ifv7i8l(I+%L+MTwa?M~q^U{?69X;uLM{fy30 diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 30aa626..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 97626ba..0000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 5f40751..0000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 99202cc..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index e992ffa..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From add8b76a57373d85d579dd6f6ca3eee78e6aff4f Mon Sep 17 00:00:00 2001 From: Hojjat Date: Sun, 14 Apr 2019 09:08:50 +0430 Subject: [PATCH 2/3] upgraded build tools and gradle version --- build.gradle | 5 +++-- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 3597555..24e6798 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { ext.compileSdkVersion = 27 - ext.buildToolsVersion = '27.0.3' + ext.buildToolsVersion = '28.0.3' ext.minSdkVersion = 16 ext.targetSdkVersion = 27 ext.supportVersion = '27.1.1' @@ -11,9 +11,10 @@ buildscript { repositories { jcenter() google() + maven { url "https://maven.google.com" } } dependencies { - classpath 'com.android.tools.build:gradle:3.1.3' + classpath 'com.android.tools.build:gradle:3.3.2' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1e83583..51eb0e0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Aug 03 23:04:03 CEST 2018 +#Thu Apr 11 12:47:04 IRDT 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip From 2f0e80a6e000131cc225615e21de53b817cecc8c Mon Sep 17 00:00:00 2001 From: Hojjat Date: Sun, 14 Apr 2019 09:09:45 +0430 Subject: [PATCH 3/3] animate background shadow in zoom end animation --- .../ablanco/zoomy/ZoomableTouchListener.java | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/zoomy/src/main/java/com/ablanco/zoomy/ZoomableTouchListener.java b/zoomy/src/main/java/com/ablanco/zoomy/ZoomableTouchListener.java index 059d67f..2110731 100644 --- a/zoomy/src/main/java/com/ablanco/zoomy/ZoomableTouchListener.java +++ b/zoomy/src/main/java/com/ablanco/zoomy/ZoomableTouchListener.java @@ -1,5 +1,8 @@ package com.ablanco.zoomy; +import android.animation.Animator; +import android.animation.AnimatorListenerAdapter; +import android.animation.ValueAnimator; import android.graphics.Color; import android.graphics.Point; import android.graphics.PointF; @@ -170,17 +173,38 @@ public boolean onTouch(View v, MotionEvent ev) { return true; } - private void endZoomingView() { if (mConfig.isZoomAnimationEnabled()) { mAnimatingZoomEnding = true; - mZoomableView.animate() - .x(mTargetViewCords.x) - .y(mTargetViewCords.y) - .scaleX(1) - .scaleY(1) - .setInterpolator(mEndZoomingInterpolator) - .withEndAction(mEndingZoomAction).start(); + ValueAnimator animator = ValueAnimator.ofFloat(0f, 1f); + animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { + float xStart = mZoomableView.getX(); + float yStart = mZoomableView.getY(); + float scaleStart = mZoomableView.getScaleX(); + + @Override + public void onAnimationUpdate(ValueAnimator animation) { + mZoomableView.setX(xStart + animation.getAnimatedFraction() * (mTargetViewCords.x - xStart)); + mZoomableView.setY(yStart + animation.getAnimatedFraction() * (mTargetViewCords.y - yStart)); + mScaleFactor = scaleStart + animation.getAnimatedFraction() * (1f - scaleStart); + mZoomableView.setScaleX(mScaleFactor); + mZoomableView.setScaleY(mScaleFactor); + obscureDecorView(mScaleFactor >= 1 ? mScaleFactor: 1); + } + }); + animator.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationCancel(Animator animation) { + mEndingZoomAction.run(); + } + + @Override + public void onAnimationEnd(Animator animation) { + mEndingZoomAction.run(); + } + }); + animator.setInterpolator(mEndZoomingInterpolator); + animator.start(); } else mEndingZoomAction.run(); }