Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365626 )

Change subject: Update Fresco to 1.4.0
......................................................................

Update Fresco to 1.4.0

Release notes:
https://github.com/facebook/fresco/releases/tag/v1.4.0

A few breaking changes are listed, but none that seem to apply to us.
They're also claiming improved performance with animated images. And most
importantly (although it's not listed in the release notes) it contains a
fix for inter-activity transitions, which weren't working ideally on API
25. Stay tuned.

Change-Id: Ia074579f986501320218cbfe9e68de960f383f8e
---
M app/build.gradle
M app/src/main/java/com/facebook/samples/zoomable/ZoomableDraweeView.java
2 files changed, 7 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/26/365626/1

diff --git a/app/build.gradle b/app/build.gradle
index 7b7ae3d..519aca1 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -167,7 +167,7 @@
     String supportVersion = '25.4.0'
     String espressoVersion = '2.2.2'
     String butterKnifeVersion = '8.5.1'
-    String frescoVersion = '1.3.0' // When updating this version, resync file 
copies under
+    String frescoVersion = '1.4.0' // When updating this version, resync file 
copies under
                                    // app/src/main/java/com/facebook
     String testingSupportVersion = '0.5'
     String mockitoCore = 'org.mockito:mockito-core:1.9.5'
diff --git 
a/app/src/main/java/com/facebook/samples/zoomable/ZoomableDraweeView.java 
b/app/src/main/java/com/facebook/samples/zoomable/ZoomableDraweeView.java
index 43aeb74..4113be0 100644
--- a/app/src/main/java/com/facebook/samples/zoomable/ZoomableDraweeView.java
+++ b/app/src/main/java/com/facebook/samples/zoomable/ZoomableDraweeView.java
@@ -47,9 +47,6 @@
   private static final Class<?> TAG = ZoomableDraweeView.class;
 
   private static final float HUGE_IMAGE_SCALE_FACTOR_THRESHOLD = 1.1f;
-  private static final boolean DEFAULT_ALLOW_TOUCH_INTERCEPTION_WHILE_ZOOMED = 
true;
-
-  private boolean mUseSimpleTouchHandling = false;
 
   private final RectF mImageBounds = new RectF();
   private final RectF mViewBounds = new RectF();
@@ -57,8 +54,7 @@
   private DraweeController mHugeImageController;
   private ZoomableController mZoomableController;
   private GestureDetector mTapGestureDetector;
-  private boolean mAllowTouchInterceptionWhileZoomed =
-      DEFAULT_ALLOW_TOUCH_INTERCEPTION_WHILE_ZOOMED;
+  private boolean mAllowTouchInterceptionWhileZoomed = true;
 
   private final ControllerListener mControllerListener = new 
BaseControllerListener<Object>() {
     @Override
@@ -287,23 +283,15 @@
       return true;
     }
 
-    if (mUseSimpleTouchHandling) {
-      if (mZoomableController.onTouchEvent(event)) {
-        return true;
-      }
-    } else if (mZoomableController.onTouchEvent(event)) {
-      // Do not allow the parent to intercept touch events if:
-      // - we do not allow swiping while zoomed and the image is zoomed
-      // - we allow swiping while zoomed and the transform was corrected
-      if ((!mAllowTouchInterceptionWhileZoomed && 
!mZoomableController.isIdentity()) ||
-          (mAllowTouchInterceptionWhileZoomed && 
!mZoomableController.wasTransformCorrected())) {
-        getParent().requestDisallowInterceptTouchEvent(true);
-      }
+    if (mZoomableController.onTouchEvent(event)) {
       FLog.v(
           getLogTag(),
           "onTouchEvent: %d, view %x, handled by zoomable controller",
           a,
           this.hashCode());
+      if (!mAllowTouchInterceptionWhileZoomed && 
!mZoomableController.isIdentity()) {
+        getParent().requestDisallowInterceptTouchEvent(true);
+      }
       return true;
     }
     if (super.onTouchEvent(event)) {
@@ -312,7 +300,7 @@
     }
     // None of our components reported that they handled the touch event. Upon 
returning false
     // from this method, our parent won't send us any more events for this 
gesture. Unfortunately,
-    // some componentes may have started a delayed action, such as a 
long-press timer, and since we
+    // some components may have started a delayed action, such as a long-press 
timer, and since we
     // won't receive an ACTION_UP that would cancel that timer, a false event 
may be triggered.
     // To prevent that we explicitly send one last cancel event when returning 
false.
     MotionEvent cancelEvent = MotionEvent.obtain(event);
@@ -393,9 +381,5 @@
 
   protected ZoomableController createZoomableController() {
     return AnimatedZoomableController.newInstance();
-  }
-
-  public void setExperimentalSimpleTouchHandlingEnabled(boolean enabled) {
-    mUseSimpleTouchHandling = enabled;
   }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/365626
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia074579f986501320218cbfe9e68de960f383f8e
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <dbr...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to