mirror of https://github.com/M66B/FairEmail.git
Simplification
This commit is contained in:
parent
221a4b7b6b
commit
939ff7f403
|
@ -528,6 +528,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
if (message != null) {
|
if (message != null) {
|
||||||
float factor = detector.getScaleFactor();
|
float factor = detector.getScaleFactor();
|
||||||
float size = tvBody.getTextSize() * factor;
|
float size = tvBody.getTextSize() * factor;
|
||||||
|
//Log.i("Gesture factor=" + factor + " size=" + size);
|
||||||
properties.setSize(message.id, size);
|
properties.setSize(message.id, size);
|
||||||
tvBody.setTextSize(TypedValue.COMPLEX_UNIT_PX, size);
|
tvBody.setTextSize(TypedValue.COMPLEX_UNIT_PX, size);
|
||||||
}
|
}
|
||||||
|
@ -1446,24 +1447,16 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onTouch(View view, MotionEvent ev) {
|
public boolean onTouch(View view, MotionEvent ev) {
|
||||||
if (ev.getPointerCount() > 1 &&
|
if (ev.getPointerCount() > 1 && textSize != 0 && gestureDetector != null) {
|
||||||
textSize != 0 && gestureDetector != null) {
|
//Log.i("Gesture event=" + ev);
|
||||||
switch (ev.getAction()) {
|
|
||||||
case MotionEvent.ACTION_DOWN:
|
|
||||||
case MotionEvent.ACTION_MOVE:
|
|
||||||
view.getParent().requestDisallowInterceptTouchEvent(true);
|
view.getParent().requestDisallowInterceptTouchEvent(true);
|
||||||
gestureDetector.onTouchEvent(ev);
|
gestureDetector.onTouchEvent(ev);
|
||||||
break;
|
|
||||||
|
|
||||||
case MotionEvent.ACTION_UP:
|
|
||||||
view.getParent().requestDisallowInterceptTouchEvent(false);
|
|
||||||
gestureDetector.onTouchEvent(ev);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
|
view.getParent().requestDisallowInterceptTouchEvent(false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
|
Loading…
Reference in New Issue