Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom gallery view in android

I want to make custom gallery view in android where i have to show 3 images on screen following.

enter image description here

enter image description here

enter image description here

while flinging on gallery view the images should look like in this pattern? I have also tried cover flow example after making some changes. that is giving that same effect but it puts selected image always in center where I have to show 1st child at left side | 2nd child in middle | 3rd child in right side.

Please share your suggestion. Thanks in advance.

like image 357
Saurabh Pareek Avatar asked May 09 '11 13:05

Saurabh Pareek


1 Answers

If it is only three images, I suggest you create a custom View.

You can create a class that extends View. There you can have a drawable or bitmap. Then you draw on canvas by overwriting onDraw() method.

On your Activity you create an ArrayList that contains 3 Views (the class I described above) and then you create an animation to translate in the Z direction when the image is clicked. Example of z animation with rotation here: http://www.ece301.com/android/63-android-animation-flip-image.html

like image 160
Juan Acevedo Avatar answered Oct 21 '22 06:10

Juan Acevedo