Ramakrishna
Ramakrishna

Reputation: 4086

move gallery images

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 clicked 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

Upvotes: 1

Views: 1843

Answers (1)

Ramakrishna
Ramakrishna

Reputation: 4086

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.

Upvotes: 5

Related Questions