2013-02-26 4 views
0

AlertDialog의 문제점은 무엇입니까? Logcat은 ""이후에 "에 도달하면 중지되고 오류 메시지가 표시되지 않습니다. 나머지 앱은 문제없이 계속됩니다. AlertDialog이 표시되지 않는 이유를 알 수 없습니다.AlertDialog가 표시되지 않고 오류 메시지가 표시되지 않습니다.

AlertDialog.Builder builder = new AlertDialog.Builder(this.cordova.getActivity()); 
Log.d(LOG_TAG, "after new AlertDialog"); 
builder.setTitle(title); 
Log.d(LOG_TAG, "after builder set title"); 
CharSequence[] choicesAsCharSeq = choices.toArray(new CharSequence[choices.size()]); 
builder.setItems(choicesAsCharSeq, new DialogInterface.OnClickListener() { 
    public void onClick(DialogInterface dialog, int which) { 
     // The 'which' argument contains the index position 
     // of the selected item 
     Log.d(LOG_TAG, "Index #" + which + " chosen."); 
     String result = ""; 
     result = "" + which; 
     // ActionSheet.this.callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, result)); 
    } 
}); 
Log.d(LOG_TAG, "after builder set items"); 
builder.show(); 
Log.d(LOG_TAG, "after builder show"); 
+0

태그에 logcat이 있습니다. 그래서, logcat은 어디에 있습니까? – DigCamara

+0

아마도 appwidget 또는 UI가 아닌 스레드에서 대화 상자를 호출합니다. –

+0

질문은 logcat 자체와 관련이 없다고 생각합니다. – celwell

답변

0

유는

builder.create().show(); 

대신 내가 CordovaPlugin 대신 플러그인을 확장 내 플러그인을 변경

builder.show(); 
+0

글쎄, 심지어 그것을 실행하지 않을 create() (나는 그것을 이전에 시도했다) – celwell

+0

Show는 아직 완료되지 않은 경우 자동으로 대화 상자를 생성 할 것이다. – AedonEtLIRA

0

의 작성해야하고 문제가 멀리 갔다.

관련 문제