我正在尝试更改AlertDialog
消息的字体大小。
Button submit = (Button) findViewById(R.id.submitButton);
submit.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
AlertDialog.Builder builder = new AlertDialog.Builder(
Application1GoodExample.this);
builder.setMessage("Your form has been successfully submitted");
TextView textView = (TextView) findViewById(android.R.id.message);
textView.setTextSize(40);
builder.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
}
});
builder.show();
}
});
我收到一条错误消息,指出 " findViewById()
" 类型未定义AlertDialog.Builder
。