Open Eleuis opened 4 years ago
You need to add a page change listener to the carousel view.
carouselView.addOnPageChangeListener(new OnPageChangeListener() {
public void onPageScrollStateChanged(int state) {}
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {}
public void onPageSelected(int position) {
// Check if this is the page you want.
}
});
I found this solution in the link below, but i'm using C# in my project, so i don't know if that specific implementation works, but it worked in my project with some adaptations to C#. https://stackoverflow.com/questions/11293300/determine-when-a-viewpager-changes-pages
Is there any way to trigger an event whenever the image changes? I need to update a textview to display information related to what is currently being shown