1public class AddInfoDialog extends Dialog{
 2
 3    public AddInfoDialog(Context context) {
 4        super(context);
 5    }

 6    
 7    protected void onCreate(Bundle savedInstanceState){
 8        super.onCreate(savedInstanceState);       
 9        setContentView(R.layout.add_info_dialog);  
10        
11        Button addInfoButton = (Button)findViewById(R.id.add_id);
12        addInfoButton.setOnClickListener(new Button.OnClickListener(){
13
14            @Override
15            public void onClick(View v) {
16                //------------提交数据到数据库
17                //------------提交后关闭对话框
18                AddInfoDialog.this.dismiss();
19                }

20            }

21        );
22    }
AddInfoDialog.this.dismiss();此处为何要加类名才能访问dismiss方法呢?