2

hey guys I'm pretty inexpirienced in Android Development so I need your help :)

The Issue

I want the user to be able to see a list of images but as soon as they scroll I want them to be able to go the next image and not slide too much and skip images

The Question

So is there a way to make the scrolling speed slower or HorizontalScrollView is not the kind of view I want in order to achieve the thing I want?

My Code

  <HorizontalScrollView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:id="@+id/scrollView">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            >

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/sample_0"
                android:id="@+id/dog"/>
            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/sample_1"/>
            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/sample_2" />
            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/sample_3"/>

        </LinearLayout>





    </HorizontalScrollView>
catchiecop
  • 388
  • 6
  • 24

2 Answers2

1

I found some information about slowing down Scroll view in other site Android: HorizontalScrollView smoothScroll animation time (little google search :P). But if you want do display alot of images, u could have problems with memory, in that situation maybe u should consider this Managing Bitmap Memory

Community
  • 1
  • 1
Pęgaz
  • 46
  • 2
  • thank you very much for answering however it seems that the thing I'm looking for is overriding onScroll() method. If I manage to figure it out I'll post the answer here :) – catchiecop May 31 '15 at 12:43
1

UPDATE

I'm writting what I ended up doing for anyone who wants to know :)

In the end the thing I was looking for was a viewPager which I implemented like this

catchiecop
  • 388
  • 6
  • 24