blazsolar / HorizontalPicker

Android widget allowing user to select one item from set of them by swiping left and right.
http://blaz.solar/HorizontalPicker
Apache License 2.0
227 stars 81 forks source link

how increase number of items #26

Closed indrajeet17 closed 9 years ago

indrajeet17 commented 9 years ago

How to increase number of items from 3 to 4 at a time in scroller and how to implement this code under
scrollView

blazsolar commented 9 years ago

ScrollView issue was fixed as part of issue #30

blazsolar commented 9 years ago

You will not be able to increase number of items to 4. There always needs to be odd number of items on the screen, because we want to have one item in center. But you can increase number of items to 5, 7, ...

To do that you can ether pass xml parameter app:sideItems="2" or set it by code picker.setSideItems(2). This parameter will set number of items that are visible on each side of currently selected item. So if you would set it to 2 total of 5 items will be visible on screen.