我的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");
你在你的標籤中提到logcat。那麼,logcat在哪裏? – DigCamara 2013-02-26 19:44:19
可能你會從appwidget或非UI線程調用對話框。 – 2013-02-26 19:49:25
我想這個問題不需要logcat本身。 – celwell 2013-02-26 19:52:37