Commit 7e4ef594 by Zac Chan

Remove touch listner

parent a36b2210
...@@ -56,6 +56,7 @@ public class FluttertoastPlugin implements MethodCallHandler { ...@@ -56,6 +56,7 @@ public class FluttertoastPlugin implements MethodCallHandler {
toast.setDuration(Toast.LENGTH_SHORT); toast.setDuration(Toast.LENGTH_SHORT);
} }
Boolean sent = false;
final Handler handler = new Handler(); final Handler handler = new Handler();
final Runnable run = new Runnable() { final Runnable run = new Runnable() {
...@@ -100,12 +101,11 @@ public class FluttertoastPlugin implements MethodCallHandler { ...@@ -100,12 +101,11 @@ public class FluttertoastPlugin implements MethodCallHandler {
} }
} }
toastView.setOnTouchListener(new View.OnTouchListener() { toastView.setOnTouchListener(new View.OnTouchListener() {
@Override @Override
public boolean onTouch(View v, MotionEvent event) { public boolean onTouch(View v, MotionEvent event) {
handler.removeCallbacks(run); handler.removeCallbacks(run);
toastView.setOnTouchListener(null);
try { try {
result.success(true); result.success(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment