2012-01-18 77 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