public boolean onLongClick(View view) {
AlertDialog.Builder builder = new AlertDialog.Builder(context)
.setTitle("Delete")
.setMessage("Are you sure want to delete")
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
arrstockdetail.remove(position);
notifyItemRemoved(position);
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
});
builder.show();
return true;
0 Comments