2012-06-18 3 views

답변

1

이미 언급 한 바와 같이 당신이 정말로, 당신은 단순히에 AlertDialog를 사용할 수 있습니다합니다 (GalaxyTab 하나를 가지고 AFAIK!) 상태 표시 줄을 피하려면 :

enter image description here

AlertDialog alertDialog = new AlertDialog.Builder(this).create(); 
alertDialog.setTitle("Reset..."); 
alertDialog.setMessage("Are you sure?"); 
alertDialog.setButton("OK", new DialogInterface.OnClickListener() { 
    public void onClick(DialogInterface dialog, int which) { 
     // here you can add functions 
    } 
}); 
alertDialog.setIcon(R.drawable.icon); 
alertDialog.show(); 

http://www.wikihow.com/Show-Alert-Dialog-in-Android

+0

하지만 내가'BroadcastReceiver'에 넣은 곳에서 오류가 발생합니다 –

+0

핸들러 또는 "activity.runOnUiThread (YourRunnable)"을 사용하여 uiThread에서 실행됩니다. – Thkru

+0

원인 : android.view.WindowManager $ BadTokenExcep : 창을 추가 할 수 없습니다 - 토큰 null은 응용 프로그램이 아닙니다. –

관련 문제