When I remove glide from the code, then it is scrolling perfectly.
I have tried this and this but i am unable to resolve the issue.
this is my main_activity code
if(finalI == size-1) {
Collections.reverse(posts_list);
ImageListAdapter adapter = new ImageListAdapter(posts_list);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
recyclerView_in_profile.setLayoutManager(linearLayoutManager);
recyclerView_in_profile.setNestedScrollingEnabled(false);
recyclerView_in_profile.setAdapter(adapter);
}
this is my adapter code for loading images into each item of recycler view.
public class ImageListAdapter_forAdd extends ArrayAdapter<String> {
private Activity context;
private int resource;
private List<String> listImage;
ImageListAdapter_forAdd(@NonNull Activity context, @LayoutRes int resource, @NonNull List<String> objects) {
super(context, resource, objects);
this.context = context;
this.resource = resource;
listImage = objects;
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
LayoutInflater inflater = context.getLayoutInflater();
@SuppressLint("ViewHolder") View v = inflater.inflate(resource, null);
// TextView tvName = (TextView) v.findViewById(tvImageName);
v.layout(0,0,0,0);
ImageView img = (ImageView) v.findViewById(R.id.imgView);
// tvName.setText(listImage.get(position).getName());5555
Glide.with(context).load(listImage.get(position)).into(img);
return v;
}
}
in another fragment I just used the same code for recycler view , its working fine , but here in nested scrolling it seems there might be some issue with glide.
Thanks.