in my recyclerview adapter I have a bottomsheet in that bottomsheet I have another recyclerview. In the inner recyclerview i have a button.
if I click that button I have to update the text in the bottomsheet which is in the other recyclerview adapter.
the button is used to delete the record from recyclreview and the count of the comments should decrease which I have displayed using a textview in another recyclerview adapter.
I have succeeded in deleting the comments in recyclerview but the count does not decrease.
LayoutInflater inflater = (LayoutInflater) add_comment.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View vi = inflater.inflate(R.layout.commenttext, null);
ImageView img_trash =vi.findViewById(R.id.img_trash);
img_trash.setOnClickListener(view11 -> {
Toast.makeText(img_trash.getContext(),"deleted",Toast.LENGTH_SHORT).show();
count_comment--;
total_comment.setText("Total Comments " +count_comment);
});
I have tried it but it fails to decrease the count
I am a budding developer in android please do help me.!! Thanks in advance..!!