Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CircleIndicator2 is not working with recyclerview snaphelper #137

Open
nivanrajmohan opened this issue May 12, 2020 · 6 comments
Open

CircleIndicator2 is not working with recyclerview snaphelper #137

nivanrajmohan opened this issue May 12, 2020 · 6 comments

Comments

@nivanrajmohan
Copy link

I'm using support version which is implementation 'me.relex:circleindicator:1.3.2' . After i attach this to recyclerview and snaphelper, the indicator is not showing. The CircleIndicator for viewpager working but CircleIndicator2 is not showing at all with recyclerview. I tried added adapter observable which is stated optional but still same.

@Slavvkko
Copy link

Hi. show your code, please.

@nivanrajmohan
Copy link
Author

nivanrajmohan commented May 13, 2020

   `<me.relex.circleindicator.CircleIndicator2
        android:layout_width="wrap_content"
        android:layout_height="48dp"
        android:id="@+id/dotindicator"
        android:visibility="visible"
        app:ci_drawable="@drawable/active_dots"
        app:ci_drawable_unselected="@drawable/deactive_dots"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/select_title"
        android:layout_marginRight="10dp">

    </me.relex.circleindicator.CircleIndicator2>`

   `private void SetUpRecycle(){
        rda = new RecyclerDefectAdapter(this,defectLists);
        rv.setAdapter(rda);
        rv.setLayoutManager(new GridLayoutManager(this,2,GridLayoutManager.HORIZONTAL,false));
        rda.notifyDataSetChanged();

        PagerSnapHelper snapHelper = new PagerSnapHelper();
        snapHelper.attachToRecyclerView(rv);
        ci.attachToRecyclerView(rv,snapHelper);
     }`

@nivanrajmohan
Copy link
Author

Hi. show your code, please.

Above is my code, xml and java code, please let me know what is the problem..

@Slavvkko
Copy link

Recently you said that you tried adding adapter observable. It is missed in SetUpRecycle.

@nivanrajmohan
Copy link
Author

I tried that before, still no changes so i removed that line.

@Slavvkko
Copy link

We can't run this piece of example to try to reproduce this error.
Show your working code, with an adapter and data that you insert to an adapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants