Issue
i'm a beginner and i have this final year project where i should build a hotel android app i wanted to make the user's interface look better so i tried to make a slideshow where images keep changing without hitting any button + 2 buttons on the sides in case the user wants to change images manualy too
just like in this link: http://www.lemeridienetoile.com/fr
i found a couple codes but not exactly what i wanted this really is important so i'll appreciate it if you can help me with the code thank you
Solution
There is a very useful library that lets you do this: android-slideshow-widget
And Here you can find a useful tutorial made using ViewPager
For handle the "next" and "back" buttons you can do something like this:
yourButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
yourViewPager.setCurrentItem(page, smoothScroll);
}
});mViewPager.setCurrentItem(currentPage + 1, true);
Answered By - Giacomo De Bacco
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.