我用AlertDialog.Builder dialog = new AlertDialog.Builder(this)定义了一个dialog,可是在setOnItemClickListener()里面怎么有没有dismiss()方法呢?AlertDialog.Builder dialog = new AlertDialog.Builder(getApplicationContext());dialog.setTitle("TITLE");dialog.setView(view);dialog.show();listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapter, View view, int pos, long id) { dialog.dismiss() // dismiss is not there. }});
繁星点点滴滴