1 AlertDialog.Builder builder = new AlertDialog.Builder(this);
2
3 LayoutInflater inflater = getLayoutInflater();
4 View dialogView = inflater.inflate(R.layout.brush_opts_dialog,null);
5
6 builder.setView(dialogView);
7
8
9 closeBtn = (Button)dialogView.findViewById(R.id.close_btn);
10
11
12 final AlertDialog dialog = builder.create();
13
14 closeBtn .setOnClickListener(new View.OnClickListener() {
15 @Override
16 public void onClick(View v) {
17 dialog.dismiss();
18 }
19 });
20
21 dialog.show();