I'm trying to make a comment page like instagram but I'm getting a ridiculous error;
Every comment row has one recyclerview and user click the "show replies" button I make Recyclerview visible but After 10-11 items, recyclerview of that item is also visible.
I know my English is terrible by mistake but i need help.
holder.replyCount.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(main,"sdf",Toast.LENGTH_LONG).show();
new Comment().getCommentResponse(getCommentModels.get(position).getId(), new IMainResponse() {
@Override
public <T> void Succsess(Response<T> _response) {
getCommentModel = (List<getCommentModel>) _response.body();
AdapterComment adapterComment = new AdapterComment(main, getCommentModel);
holder.recyclerView.setVisibility(View.VISIBLE);
holder.recyclerView.setAdapter(adapterComment);
holder.recyclerView.setHasFixedSize(true);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(main);
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
holder.recyclerView.setLayoutManager(linearLayoutManager);
}
@Override
public void Error(ErrorModel _eresponse) {
}
});
}
});