Update Question I like RecyclerView using Glide, because image will be load when item has appeared in the screen. Example : 100 item, 10 item has appeared in the screen, glide just load 10 item.
But when RecyclerView inside NestedScrollView, image will be load together (100 item load together). Question : how to use glide with RecyclerView inside NestedScrollView?
<android.support.v4.widget.NestedScrollView
android:id="@+id/nestedScroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</android.support.v4.widget.NestedScrollView>
Java Code
NestedScrollView nestedScroll = (NestedScrollView) findViewById(R.id.nestedScroll);
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
LinearLayoutManager linear = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
recyclerView.setLayoutManager(linear);
recyclerView.setNestedScrollingEnabled(false);