リストビューには独自のスクロールがあります。そのため、リストビューをスクロール ビュー内に配置しないでください。
カスタム リストビューを使用してサムネイルを表示します。
データベースから URL を取得します。
http://www.androidhive.info/2012/02/android-custom-listview-with-image-and-text/
http://www.youtube.com/watch?v=wDBM6wVEO70。トークはリストビューとパフォーマンスについてです。
ビューホルダーを使用します。http://developer.android.com/training/improving-layouts/smooth-scrolling.html .
リストビューに多数の画像を表示している場合は、以下のライブラリのいずれかを使用することを検討してください。
1.ユニバーサルイメージローダー。https://github.com/nostra13/Android-Universal-Image-Loader .
2.レイジーリスト。https://github.com/thest1/LazyList .
どちらもキャッシュを使用します。
ユニバーサル イメージ ローダーの場合
アダプターコンストラクターで
File cacheDir = StorageUtils.getOwnCacheDirectory(a, "UniversalImageLoader/Cache");
imageLoader = ImageLoader.getInstance();
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(a)
// You can pass your own memory cache implementation
.discCache(new UnlimitedDiscCache(cacheDir)) // You can pass your own disc cache implementation
.discCacheFileNameGenerator(new HashCodeFileNameGenerator())
.enableLogging()
.build();
// Initialize ImageLoader with created configuration. Do it once.
imageLoader.init(config);
options = new DisplayImageOptions.Builder()
.showStubImage(R.drawable.stub_id)//dummy image
.cacheInMemory()
.cacheOnDisc()
.displayer(new RoundedBitmapDisplayer(20))
.build();
getview() で
ImageView image=(ImageView)vi.findViewById(R.id.imageview);
imageLoader.displayImage(imageurl, image,options);