Closed myinnos closed 7 years ago
If the bubble doesn't show at all it's most likely that the adapter implementing the FastScroller.SectionIndexer
wasn't setup correctly. Can you post snippets from your xml layout and where you are setting the adapter to the FastScrollRecyclerView?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include android:id="@+id/standard_toolbar" layout="@layout/standard_toolbar" />
<com.l4digital.fastscroll.FastScrollRecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/standard_toolbar"
app:bubbleColor="#00bb00"
app:bubbleTextColor="#ffffff"
app:handleColor="#999999"
app:trackColor="#bbbbbb"
app:hideScrollbar="false"
app:showTrack="false" />
</RelativeLayout >
I used your layout for the example project and the bubble appeared correctly (attached screenshot). Take a look at how the example project implements FastScroll to see if there are any differences with your implementation.
Base Activity
@BindView(R.id.recycler_view)
FastScrollRecyclerView recyclerView;
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(new UserAppsAdapter(getAppsList(), recyclerView));
Adapter class
public class UserAppsAdapter extends RecyclerView.Adapter<UserAppsAdapter.ViewHolder> implements FastScroller.SectionIndexer {
@Override
public String getSectionText(int position) {
return "test";
}
Let me know if any thing missed out!
I don't see any issues with this code, except for passing the recyclerView into the adapter constructor seems unnecessary.
When scrolling, are you seeing the scrollbar handle? If so, when touching the handle to fastscroll the bubble should appear.
Your awesome, exactly as you said, the bubble is appearing when i touching the handle.
Then how can i resolve now!
Great! I'll close this issue.
How you closed this issue! still need to resolved, even text also not showing inside bubble
Your last comment said the bubble was now appearing, which resolves the original issue. This is the intended behavior.
If the adapter is implemented correctly, the text will show in the bubble. Take a look at the example module to see how it is implemented.
I Have Question ? Is bubble will show only when user touch on scroll ? if yes my issue resolved 👍
or Even when user scroll view if bubble appears 🥇 ?
Yes, the bubble only appears when the user touches the scroll handle as intended.
Thanks! 🥇 awesome 💯! My issue resolved 👍
@randr0id Hi I am getting Java.lang.StringIndexOutOfBoundsException: length=0; index=0 error on scrolling.Kindly give me the solution.
@karthickperumal I need more context or a stacktrace. From the error you provided it looks like you're trying to access a character by index on an empty String, and I don't think there is code that does that in the library (there is in the example).
Scroll view works well as name said fast scroller, but bubble view is not showing at all on scroll!