0

I am using Horizontal recyclerview inside NestedScrollView. when i want to scroll faster inside horizontal scroll view it fling go to above of the view. and recyclerview not much smooth.

  • Note: when I load gif image then it happen but when jpg image load never go to above of the view. but not smooth any time as expected.

All recyclerview data bind

    RecyclerViewDataAdapter adapter = new RecyclerViewDataAdapter(getActivity(), allSampleData);
    LinearLayoutManager mLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
    recyclerView.setLayoutManager(mLayoutManager);
    mLayoutManager.setAutoMeasureEnabled(true);
    recyclerView.setAdapter(adapter);
    adapter.notifyDataSetChanged();
    recyclerView.setHasFixedSize(true);
    recyclerView.setNestedScrollingEnabled(false);

Section data initialize

    SectionListDataAdapter itemListDataAdapter = new SectionListDataAdapter(mContext, singleSectionItems, sectionName,itemRowHolder.previewImage);
    itemRowHolder.recycler_view_list.setHasFixedSize(true);
    itemRowHolder.recycler_view_list.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
    itemRowHolder.recycler_view_list.setAdapter(new AlphaInAnimationAdapter(itemListDataAdapter));
    itemRowHolder.recycler_view_list.setNestedScrollingEnabled(false);

 <android.support.v7.widget.RecyclerView
                android:id="@+id/recycler_view_list"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_alignParentStart="true"
                android:layout_centerVertical="true"
                android:layout_gravity="center_vertical"
                android:orientation="horizontal"
                android:paddingTop="0dp" />

Image load

Glide.with(MyApplication.applicationContext) // replace with 'this' if it's in activity
                .load(previewUrl.replaceAll(" ", "%20"))
                .listener(new RequestListener<Drawable>() {
                    @Override
                    public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
                        holder.progressBar.setVisibility(View.GONE);
                        return false;
                    }

                    @Override
                    public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, com.bumptech.glide.load.DataSource dataSource, boolean isFirstResource) {
                        holder.progressBar.setVisibility(View.GONE);
                        return false;
                    }


                })

                .into(holder.itemImage);
t.gakk
  • 77
  • 2
  • 10
  • Possible duplicate of [Recyclerview inside Nested Scrollview scroll but does not fast scroll like normal Recyclerview or Nested Scrollview](https://stackoverflow.com/questions/37301724/recyclerview-inside-nested-scrollview-scroll-but-does-not-fast-scroll-like-norma) – Vishva Dave Mar 12 '18 at 10:55
  • 2
    Please read my question fast. and all solution i already try but nothing halp me – t.gakk Mar 12 '18 at 10:58

1 Answers1

0

I found solution my self , This happen with glide library. you can use Facebook fresco library for gif load.

t.gakk
  • 77
  • 2
  • 10