diff --git a/FAQ.md b/FAQ.md index a0bc59213f..db474016e8 100644 --- a/FAQ.md +++ b/FAQ.md @@ -54,12 +54,12 @@ For authorizing: * ~~Pinch zoom~~ (not reliably possible in a scrolling list; the full message view can be zoomed instead) * ~~More compact folder view~~ * ~~Compose lists and tables~~ (this requires a rich text editor, see [this FAQ](#user-content-faq99)) +* ~~Pinch zoom text size~~ * Send as attachment * Themes * Search for settings * Select any day for time conditions * Widget for selected account -* Pinch zoom Anything on this list is in random order and *might* be added in the near future. diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 28ae554757..6a3ab5fd18 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -66,6 +66,7 @@ import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.MotionEvent; +import android.view.ScaleGestureDetector; import android.view.TouchDelegate; import android.view.View; import android.view.ViewAnimationUtils; @@ -227,7 +228,11 @@ public class AdapterMessage extends RecyclerView.Adapter 1 && + textSize != 0 && gestureDetector != null) { + switch (ev.getAction()) { + case MotionEvent.ACTION_DOWN: + case MotionEvent.ACTION_MOVE: + view.getParent().requestDisallowInterceptTouchEvent(true); + gestureDetector.onTouchEvent(ev); + break; + + case MotionEvent.ACTION_UP: + view.getParent().requestDisallowInterceptTouchEvent(false); + gestureDetector.onTouchEvent(ev); + break; + } + return true; + } + return false; + } + @Override public void onClick(View view) { final TupleMessageEx message = getMessage(); @@ -3477,6 +3525,10 @@ public class AdapterMessage extends RecyclerView.Adapter> values = new HashMap<>(); + private LongSparseArray sizes = new LongSparseArray<>(); private LongSparseArray bodies = new LongSparseArray<>(); private LongSparseArray> attachments = new LongSparseArray<>(); private LongSparseArray accountSwipes = new LongSparseArray<>(); @@ -1179,6 +1180,16 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. return false; } + @Override + public void setSize(long id, float size) { + sizes.put(id, size); + } + + @Override + public float getSize(long id, float defaultSize) { + return sizes.get(id, defaultSize); + } + @Override public void setBody(long id, Spanned value) { if (value == null)