recyclerView.setAdapter(usersAdapter);
recyclerView.setItemAnimator(new DefaultItemAnimator());
// Connect the scroller to the recycler (to let the recycler scroll the scroller's handle)
// Connect the section indicator to the scroller
fastScroller.setSectionIndicator(sectionTitleIndicator);
recyclerView.setOnScrollListener(fastScroller.getOnScrollListener());
setRecyclerViewLayoutManager(recyclerView);
I have used code as follow, but I don't able to see the character in bubble.
In JavaFile:
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.rvAddColorMarkUserLists); VerticalRecyclerViewFastScroller fastScroller =(VerticalRecyclerViewFastScroller) findViewById(R.id.fast_scroller); SectionTitleIndicator sectionTitleIndicator =(SectionTitleIndicator) findViewById(R.id.fast_scroller_section_title_indicator); fastScroller.setRecyclerView(recyclerView);
recyclerView.setAdapter(usersAdapter); recyclerView.setItemAnimator(new DefaultItemAnimator()); // Connect the scroller to the recycler (to let the recycler scroll the scroller's handle)
// Connect the section indicator to the scroller fastScroller.setSectionIndicator(sectionTitleIndicator); recyclerView.setOnScrollListener(fastScroller.getOnScrollListener()); setRecyclerViewLayoutManager(recyclerView);
In xml file
<android.support.v7.widget.RecyclerView android:id="@+id/rvAddColorMarkUserLists" style="@style/recyclerViewListView" android:visibility="visible" android:paddingTop="10dp" />