Android gallery widget should never end

Posted by Faisal khan on Stack Overflow See other posts from Stack Overflow or by Faisal khan
Published on 2010-04-13T12:48:14Z Indexed on 2010/04/13 12:53 UTC
Read the original article Hit count: 767

Filed under:
|
|

Following code display the Gallery items.

  Gallery g = (Gallery) findViewById(R.id.icon_gallery);
    ImageAdapter iv = new ImageAdapter(this);
    g.setAdapter(iv);
    // line dispalys default selection center of the image.
    g.setSelection(iv.getCount()/2, true);

There are 5 images i added in imageAdapter. displaying 3rd image in the center. When user drag gallery from left to right or right to left it stops after 2 item scroll i want this scroll to never finish it should start start cycle again once cycle finish. how can i do it ?

© Stack Overflow or respective owner

Related posts about android

Related posts about gallery