There are tentatively photos that I add to the GridView.
At the moment, I delete them using the following method:
closeView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { imageUploads.remove(position); notifyDataSetChanged(); } }); But the problem is that it removes the last position, regardless of which element was pressed.
It is necessary to delete an element by the position that was clicked. The most interesting thing is that in the logs it clicks on the position correctly.