我上课
public class RequestHandler {
ProgressDialog notif;
// getting some data
…
catch (Exception e) {
e.printStackTrace();
notif = ProgressDialog.show(secondactivity.this,"ERROR",e,false,false); // <-- error in here
}
}
// CALLED IN HERE (secondactivity.java)
protected String doInBackground(Void... params) {
RequestHandler rh = new RequestHandler();
String s = rh.sendGetRequest(Konfigurasi.URL_GET_ALL);
return s;
}
如何显示带有错误消息的对话框?
错误提示:
不在封闭类中
我应该添加上下文或其他内容吗?
顺便说一句:RequestHandler和secondactivity在不同的文件上。