DialogButton
即使我在其中,我也不会拒绝.dismiss()
。我的代码:
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.iabout);
// custom dialog
final Dialog dialog = new Dialog(context);
dialog.setContentView(R.layout.iabout);
dialogButton = (Button) dialog.findViewById(R.id.btAboutOK);
// if button is clicked, close the custom dialog
dialogButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
dialog.dismiss();
}
});
}
感谢任何帮助。