我试图如果用户亘古不具有存储在我的数据库中的一些信息则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 –