Commit 04f51d29 by Zac Chan

Added some new stuff

parent f70d25f5
...@@ -58,13 +58,7 @@ public class FluttertoastPlugin implements MethodCallHandler { ...@@ -58,13 +58,7 @@ public class FluttertoastPlugin implements MethodCallHandler {
final Handler handler = new Handler(); final Handler handler = new Handler();
final Runnable run = new Runnable() {
@Override
public void run() {
result.success(false);
}
};
switch (gravity) { switch (gravity) {
case "top": case "top":
...@@ -99,7 +93,7 @@ public class FluttertoastPlugin implements MethodCallHandler { ...@@ -99,7 +93,7 @@ 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);
result.success(true); result.success(true);
return false; return false;
} }
...@@ -124,7 +118,13 @@ public class FluttertoastPlugin implements MethodCallHandler { ...@@ -124,7 +118,13 @@ public class FluttertoastPlugin implements MethodCallHandler {
// }; // };
toast.show(); toast.show();
handler.postDelayed(run,35000); handler.postDelayed(new Runnable() {
@Override
public void run() {
result.success(true);
}
},35000);
// thread.run(); // thread.run();
......
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