我試圖如果用戶亙古不具有存儲在我的數據庫中的一些信息則alertdialog將與按鈕用戶面前彈出來呈現在我的actvitiy的alertdialog其描述。 這裏是活動AlertDialog無法正確呈現對話框我想
AlertDialog.Builder myAlert= new AlertDialog.Builder(this);
myAlert.setMessage("You are winner!").setPositiveButton("Continue...", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
})
.setTitle("Welcome")
.create();
myAlert.show();
所以basicly我沒有得到期望的alertdialog我想,我得到這樣的事情enter image description here我的對話框代碼。
我有標題和消息,按鍵之間沒有國界的,我沒有按鈕放置在中心,默認情況下,我應該怎麼做才能解決這些我已經嘗試了許多視頻和帖子。
這是默認的材料設計'alert dialog',您需要爲'alert dialog'創建'custom layout'# –
http://stackoverflow.com/questions/22655599/alertdialog-builder-with-custom-layout-和EditText上,不能訪問視圖 –
http://stackoverflow.com/questions/2795300/how-to-implement-a-custom-alertdialog-view –