I want to add lazy loading feature to HorizontalScrollView, It has linearlayout as a child and i am addding to linearlayout, I am interested in listening to the event when the child view is out of the visibility area, I see in linearlayout implementation it does not call either dispatchViewVisibility or onDraw on child view , why i want that because bitmap attached to the child view can be recycled and create bitmap again when child view is visible (well that is a separate part ,How can i create that bitmap very fast, I am planning to use opengl for that) but the question is how can make such custom view. I can not use gallery view because it does not solve my purpose I saw that viewgroup has feature of dispatchingViewVisibility and dispatchOnDraw but not sure how to use that with HorizontalScrollView.? All i am doing to prevent Out of Memory issue Any suggestion and help would be appreciated thanks
Asked
Active
Viewed 2,073 times
5
-
go here http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview and try that but for your list not dificult have fun – PedroAGSantos Aug 26 '11 at 07:12
-
@subspider I want to have horizontal layout not the listview thanks – himanshu jain Aug 29 '11 at 20:59
1 Answers
0
Do not use HorizontalScrollView
. Instead, use the ViewPager
component that was added to the Android Compatibility Library, as it is designed for this sort of scenario. Here is a blog post that explains a bit more.

CommonsWare
- 986,068
- 189
- 2,389
- 2,491
-
4I tried ViewPager it is cool , but its require one page per pic which i dont want earlier we had horizontal scroll view with atleast 4-5 images in the area of visibility. Any suggestion thanks ** – himanshu jain Aug 29 '11 at 20:59