Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to cycle views in an Horizontal View Pager implementation in Android

Does anyone has an idea how to cycle views in an horizontal view pager in Android. Let's say we have 5 views, and the first view is selected right now, the 5th view should be on the left and the 2nd view should be on the right. I should be able to move to the 2nd/5th by swiping to the left/right respectively.

like image 412
Ravi Teja Avatar asked Nov 13 '22 12:11

Ravi Teja


1 Answers

A custom PagerAdapter should do the trick.

See step-by-step help for horizontal view pager here: http://android10.org/index.php/articlesuserinterface/354-android-ui-horizontal-view-pager

like image 155
Graham Avatar answered Nov 16 '22 02:11

Graham