Когда я удаляю скольжение из кода, он отлично прокручивается.
Я пробовал это и это , но я не могу решить эту проблему.
это мой код main_activity
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);
}
это мой код адаптера для загрузки изображений в каждый элемент представления переработчика.
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;
}
}
в другом фрагменте, который я только что использовалтот же код для представления рециркулятора, он работает нормально, но здесь при вложенной прокрутке кажется, что может быть некоторая проблема с glide.
Спасибо.