I’m trying to make a Gallery widget using HorizontalScrollView, So inside the HorizontalScrollView I add ImageViews, and the problem is that I’m going to add 600+ images!
Can I make some kind of a custom adapter in order to override the GetView method and utilize convertView in order to make the app smoother and avoid adding 600+ views at the same time?
I’m trying to make a Gallery widget using HorizontalScrollView , So inside the HorizontalScrollView
Share
HorizontalScrollViewcan contain only oneView, so you have to draw that wholeViewanytime you are drawing any part of it. This could, however, be worked around byViewGroupas child of yourHorizontalScrollViewViewGroupand callgetView()and recycle on your own, drawing only Views that are currently visible in yourHorizontalScrollViewBut this would take a lot if your time. I’d at least try something like
HorizontalListViewfirst. A how-to of that specific class can be found here.