ai212983 / android-spinnerwheel

Wheel-like spinner widget for Android
http://git.io/spinwheel
Apache License 2.0
639 stars 249 forks source link

On start scroll to item #63

Closed octavianmiu closed 7 years ago

octavianmiu commented 8 years ago

Hello,

I am trying to make the spinner to scroll to the desired item when app starts. I am using scroll(int item , int time), setCurrentItem(int ibj, int boolean) but nothing happens. Do you have any idea where the problem is?

ebadali commented 8 years ago

Wel, you can always use ScrollTo(x,y). In your case you might want to calculate the vertical position of the desired item.

mScrollView.post(new Runnable() { 
        public void run() { 
             mScrollView.scrollTo(0, mScrollView.getBottom());
        } 
});

Hope this will help.