Saurabh Pareek
Saurabh Pareek

Reputation: 7134

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.

Upvotes: 9

Views: 5292

Answers (1)

Juan Acevedo
Juan Acevedo

Reputation: 1788

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

Upvotes: 1

Related Questions