2012-01-18 36 views

回答

2

這個問題還沒有一個具體的答案。你必須使用很多東西。你只是搜索圖庫視圖和延遲適配器...

1

通過使用XML解析,解析所有的圖像網址。獲得所有圖像網址後,您可以使用Lazy load of images in ListView加載圖像。在惰性加載代碼,他們已經用在佈局一個ListView,因此圖像和相應的文字顯示爲列表項,您可以在ListView控件更改爲畫廊是這樣的:

<?xml version="1.0" encoding="utf-8"?> 
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
     android:orientation="vertical" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent"> 
     <Gallery android:id="@+id/gallery" android:layout_width="fill_parent" 
     android:layout_height="wrap_content" /> 
     <Button 
      android:id="@+id/button1" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:text="Clear Cache"/> 
    </LinearLayout> 

我認爲這將讓你期望的結果。

+0

非常感謝。它運作良好! – user818992 2012-01-23 12:48:18

+0

@ user818992如果我的答案幫助您解決了您的問題,請接受我的答案。 http://stackoverflow.com/faq#reputation – Basil 2012-01-24 04:57:10

相關問題