i have a Custom Alert Dialog , i have a imageView For close Dialog but i don`t know how to do it. I try to do it by dismiss or cancel, but it does not work
public void onClick(View v)
{
final AlertDialog.Builder dialog = new AlertDialog.Builder(context);
final View viewLayout = mInflater.inflate(R.layout.listview_addstudent_items , null);
dialog.setView(viewLayout);
ImageView closeIcon_img = (ImageView)viewLayout.findViewById(R.id.item_img_close);
closeIcon_img.setOnClickListener(new View.OnClickListener() {
// I want To dismiss Here
});
dialog.show();
}
});
Try this :
Try Like this create
AlertDialog
formAlertDialog.Builder
.