开发者

move gallery images

开发者 https://www.devze.com 2023-02-13 19:19 出处:网络
i shows a images in gallery like this <Gallery Images> in above the left arrow(<) and right arrow(>) are also images. in between those images i shows a gallery images. so i want to perform

i shows a images in gallery like this

             <  Gallery Images  >

in above the left arrow(<) and right arrow(>) are also images. in between those images i shows a gallery images. so i want to perform onclick action on that images i.e., the left arrow(<) and right arrow(>). if cl开发者_运维技巧icked on the left arrow(<) the gallery images are will be move to left. or if clicked on right arrow(>) the gallery images are will be move to right.

so please tell me your answer.

Thank you in advance.

Best Regards


i get a position of the view and then define a field

 private int mPos = 0;

then check the

 if (mPos < galleryimages.length - 1)
     ++mPos;
     galleryview.setSelection(mPos, true);

this is for right arrow(>) and for left arrow(<) is

 if (mPos > 0)
     --mPos;
     galleryview.setSelection(mPos, true);

This is the answer and also it is working.

0

精彩评论

暂无评论...
验证码 换一张
取 消