【发布时间】:2010-10-31 19:27:46
【问题描述】:
我注意到在 catch 块中使用 toast 时不会显示它。 有谁知道在捕获异常时如何显示敬酒?一个例子:
try {
// try to open a file
} catch (FileNotFoundException e) {
Toast.makeText(this, R.string.txt_file_not_found, Toast.LENGTH_LONG);
return; // cancel processing
}
【问题讨论】:
-
在return语句前睡2秒会出现吗?
-
不。我试过了,但没有任何改变。什么都没有发生...
标签: android exception show toast catch-block