点击事件内部类中使用内部类

viewHolder.delButton.setOnClickListener(***new OnClickListener()*** {

            @Override
            public void onClick(View arg0) {
                // TODO Auto-generated method stub
                AlertDialog.Builder builder = new Builder(context);
                builder.setTitle("提示信息").setMessage("您确定要删除该用户吗?");

                builder.setPositiveButton("确定",
                        ***new DialogInterface.OnClickListener()*** {
                            @Override
                            public void onClick(DialogInterface arg0, int arg1) {
                                // TODO Auto-generated method stub
                                Toast.makeText(context, "删除成功", 0).show();
                            }

                        });
                builder.setNegativeButton("取消",
                        ***new DialogInterface.OnClickListener()*** {

                            public void onClick(DialogInterface arg0, int arg1) {

                            }

                        });

                builder.show();

            }
        });

你可能感兴趣的:(Android)