을 감사
@Override
public void onShake(float force)
{
// TODO Auto-generated method stub
hour = cal.get(Calendar.HOUR);
hour = hour+1;
mins = cal.get(Calendar.MINUTE);
timeString = hour+":"+mins+":"+today.second;
showDialog(timeString, "");
}
public void showDialog(String timeString, String title)
{
builder = new AlertDialog.Builder(getActivity());
builder.setTitle(title);
builder.setMessage("Reaching at:"+" "+ timeString+"?");
builder.setNegativeButton("NO", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// Do nothing
dialog.dismiss();
dialog.cancel();
}
});
builder.setPositiveButton("YES", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which)
{
// Do nothing but close the dialog
dialog.cancel();;
new AddStatusTask().execute();
}
});
alert = builder.create();
alert.show();
}
; alert = builder.create(); alert.show();
대신 builder.show();
으로 시도하십시오.
나는 asynctask의 postexceute에 대해 dissom에 대한 대화의 글로벌 참조를 유지 했습니까? – KOTIOS
@mtetno 아니, 아니. 다른 버튼을 클릭하여 동일한 코드를 실행하면 잘 작동합니다. 그것의 장치가 동요 할 때만이 문제 occrs –
와 이것은 동일한 활동 권리에서인가? 그냥 완료 asynctask에 그것을 기각하고 싶습니까? – KOTIOS