0

how to center an image from gallery? If i use setSelection()
the gallery didn't are center, she move sometime in left sometime in right. She move in center only if the image was in extremities or if the selected image was in center.

If i do a second clique the picture go in center, i don't understand why. I use a setOnItemClickListener to change the image.

2
  • 1
    You will need to post some code. Describing what you are trying to do. Oct 13, 2011 at 15:23
  • if i click of a image of the gallery, i change the image. of the gallery and a would like to center this gallery in the mobile screen.
    – Agriesean
    Oct 13, 2011 at 15:39

1 Answer 1

0

This is what the behavior of the Gallery.Just Use the classes of the Gallery Customize it which involve CustomGallery CustomAbsSpinner and CustomAdapterView and change the function of Gallery class getCenterOfGallery() as per your requirement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.