Я пытаюсь использовать Nested Recyclerview In Child Adapter, определять вызов данных recyclerview несколько раз каждый раз (Загружать данные несколько раз)
Это мой родительский адаптер
@Override
public void onBindViewHolder(final MyViewHolder holder, final int position) {
holder.recyclerView.setRecycledViewPool(viewPool);
StoreCategoriesModel s_model = categoriesModelList.get( position );
holder.tv_category_name.setText( s_model.getCategoryName() );
mAdapter = new RawOffersCategoryAdapter( mContext, productCategoriesModelList , this );
holder.recyclerView.setAdapter( mAdapter );
holder.recyclerView.setLayoutManager( new LinearLayoutManager( mContext, LinearLayoutManager.VERTICAL, false ) );
holder. recyclerView.setNestedScrollingEnabled(false);
holder.recyclerView.setHasFixedSize(true);
}
Child Adapter
@Override
public void onBindViewHolder(final MyViewHolder holder, final int position) {
KeyWord key = AppSharedPreferences.getSharePreference( mContext ).getKeyword();
Log.e( "ModelList inside-->", "" + productCategoriesModelList.size() );
final ProductCategoriesModel model = productCategoriesModelList.get( position );
Glide.with( mContext )
.load( model.getProductImageUrl() )
.apply( new RequestOptions().diskCacheStrategy( DiskCacheStrategy.ALL ).skipMemoryCache( false ) ).error( R.drawable.placeholder )
.placeholder( R.drawable.placeholder )
.fitCenter()
.into( holder.img_product );
}