3

I am working on application in which gallery require as bellow image :

enter image description here

I searched over internet but it gives result similar to Image Gallery. But I want to create the gallery which will move in circular fashion, means it just bend the first and last member of gallery. Is it possible? or Is the horizontal ScrollView better approach to do this?

Any better approach will be appreciated.. Thanks in advance.

Community
  • 1
  • 1
Swapnil Sonar
  • 2,232
  • 2
  • 29
  • 42
  • Possible duplicate : [Click here](http://stackoverflow.com/questions/3393918/how-to-implement-an-endless-gallery-in-android) – krishna Jul 16 '13 at 11:08
  • Thanks Krishna. But I want circular effect visually not functionally. The gallery should look like bending on the edges. Any suggestion.... – Swapnil Sonar Jul 16 '13 at 11:21

1 Answers1

3

I have found a solution and it achieved using Custom Gallery. I used following layout file for that

main.xml

    <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/linear_layout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/gal_bg"
        android:orientation="vertical" >

        <Gallery
            android:id="@+id/horizontallistview"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="40dp"
            android:layout_marginRight="40dp" />
        <!-- android:background="@drawable/gal_overlay" -->

        <ImageView
            android:layout_width="fill_parent"
            android:layout_height="120dp"
            android:background="@drawable/gal_overlay" />

    </FrameLayout>

And it uses the some images as background to FrameLayout and ImageView. You will find the complete source code of project on GitHub.

Happy Coding..

Swapnil Sonar
  • 2,232
  • 2
  • 29
  • 42