开发者

how center a selected picture in the gallery?

开发者 https://www.devze.com 2023-04-13 00:04 出处:网络
how to center an image from开发者_StackOverflow中文版 gallery? If i use setSelection() the gallery didn\'t are center, she move sometime in left sometime in right.

how to center an image from开发者_StackOverflow中文版 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.


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.

0

精彩评论

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