我有一个带有标题和图像的警报生成器:
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.pull);
builder.setIcon(R.drawable.tira_cable);
builder.setPositiveButton(R.string.accept, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
//actions
}
});
AlertDialog dialog = builder.create();
dialog.show();
我检查了问题不在标题中,在图像中,因为如果我评论 setIcon 行,它会显示标题。