0

I am using lots of images in horizontalscrollview. And I am addind this layout programmatically. I want to load images when scrolling. How can I do that?

 <HorizontalScrollView
                    android:layout_width="wrap_content"
                    android:background="@color/gray"
                    android:layout_height="wrap_content">
            <LinearLayout
                    android:id="@+id/bill_layout"

                    android:orientation="horizontal"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent">
            </LinearLayout>
skhizein
  • 437
  • 1
  • 9
  • 15
  • use [HorizontalListView](https://github.com/MeetMe/Android-HorizontalListView) and lazy loading... if `Bitmap`s are of large size, load scaled down version into memory... see an example of handling bitmaps [here](http://developer.android.com/training/displaying-bitmaps/load-bitmap.html)... – Gopal Gopi Apr 11 '14 at 10:14
  • http://stackoverflow.com/questions/19674906/outofmemory-error-in-animation-list-android/19674967#19674967 – Akarsh M Apr 11 '14 at 10:15
  • http://stackoverflow.com/questions/23008913/android-outofmemoryerror-for-large-images/23009205#23009205 – Akarsh M Apr 11 '14 at 10:15
  • I cant understand lazy loading with horizontalscrollview. Can you give some example code? – skhizein Apr 11 '14 at 10:16

0 Answers0