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

how reload data #58

Open
ahmedneffati opened this issue Oct 5, 2017 · 1 comment
Open

how reload data #58

ahmedneffati opened this issue Oct 5, 2017 · 1 comment

Comments

@ahmedneffati
Copy link

hi how can I reload data to the CycleViewPager

@ghost
Copy link

ghost commented Oct 4, 2018

You must have your adapter to implement data creation in carousel, so if you want to update your data just update de source of it and then update adapter:

PageAdapter myPageAdapter = new PageAdapter(context, arrayData);

LavadosCarouselAdapter carousel = (HorizontalInfiniteCycleViewPager) findViewById(R.id.carousel_id);
carousel.setAdapter(myPageAdapter);

//Update data
arrayData.add(something);

//refresh adapter
myPageAdapter.notifyDataSetChanged();

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

1 participant