2012-07-30 15 views
0

當我在互聯網上使用Listview的圖片時,我的Listview滾動速度很慢。
但是在Twitter,Google +和其他應用程序(儘管顯示來自互聯網的圖像)等應用程序中,滾動沒有問題,並且非常快速且流暢。如何提高列表視圖的性能?

如何提高帶有圖像的Listview的性能?

+0

看到這個線程:http://stackoverflow.com/questions/11684520/efficient-listview-in-android,大概是這樣的是你在找什麼。 – overbet13 2012-07-30 12:56:10

+0

必須檢查=> [Android的 - 我如何在ListView中執行延遲加載的圖像](http://stackoverflow.com/a/3068012/379693) – 2012-07-30 13:00:13

回答

0

有是一些ThumbRules,它可以幫助你優化列表視圖:

- >通過使用ConvertView重複使用視圖,在

`getView(AdapterView<?> adapterView, View convertView, int position, long id)` 

- >。使用延遲加載加載圖片來自網絡,請參閱

http://codehenge.net/blog/2011/06/android-development-tutorial-asynchronous-lazy-loading-and-caching-of-listview-images/

- >還可以使用ViewHolders來提高通脹time.check鏈接:

http://jmanzano.me/efficient-listviews-in-android-viewholder-pattern-2/

+0

非常感謝jeet – maxoya 2012-07-30 13:04:11