Commit b28d4e2d authored by fallenstardust's avatar fallenstardust

fix makeText

parent 270be334
......@@ -226,8 +226,7 @@ public class GameUriManager {
if ("file".equals(uri.getScheme()) || "content".equals(uri.getScheme())) {
File file = toLocalFile(uri);
if (file == null || !file.exists()) {
YGOUtil.showTextToast("open file error");
Toast.makeText(activity, "open file error", Toast.LENGTH_LONG).show();
YGOUtil.showTextToast("open file error", Toast.LENGTH_LONG);
return;
}
boolean isYdk = file.getName().toLowerCase(Locale.US).endsWith(YDK_FILE_EX);
......
......@@ -41,8 +41,7 @@ public class YGOUtil {
}
public static void showTextToast(int gravity, String message, int duration) {
Toast toast = new Toast(App.get());
toast.setDuration(duration);
Toast toast = Toast.makeText(App.get(), message, duration);
toast.setGravity(gravity,0, 0);
toast.setText(message);
toast.show();
......
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