我用于创建自定义对话框的这部分代码..
final Dialog dialog = new Dialog(preferences.this);
dialog.setContentView(R.layout.customdialog);
dialog.setTitle("Title...");
TextView text = (TextView) dialog.findViewById(R.id.text);
text.setText("Bonboniziraj se i ti :)");
Button button = (Button) dialog.findViewById(R.id.dialogButtonOK);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
dialog.show();
}
});
我收到 SetOnClickListener 错误!!