1

I add many ImageView to HorizontalScrollView, each ImageView load image from internet. But screen only display 3 ImageView.

I want to know what ImageView is on screen because I want to remove image from another ImageView that not display in screen.

Is there anyway to do that ?

Sorry for my bad English.

Akshay
  • 2,506
  • 4
  • 34
  • 55
hiepnh
  • 437
  • 1
  • 8
  • 9
  • And if you are in a larger screen (like a tablet) it might display more than three, right? – iTurki Aug 19 '12 at 14:16
  • yes. I caculate screen width and change number imageView display on each screen – hiepnh Aug 19 '12 at 14:53
  • So, what's your problem? You have the screen width and you know the number of the ImageView needed to be displayed. – iTurki Aug 19 '12 at 15:48
  • I know the number of ImageView needed but don't know id of them. I want to load image in ImageView which dislay in screen. All other ImageView doesn't load until its display on screen – hiepnh Aug 19 '12 at 23:38

1 Answers1

1

You need to consider using lazy ListView instead of <ScrollView> for your images. With a lazy ListView, the app won't download the hidden images until the user scroll to view them.

I'm not familiar with such a ListView but I think those links might help you:

Community
  • 1
  • 1
iTurki
  • 16,292
  • 20
  • 87
  • 132