自定义的ListView? [英] Custom ListView?

查看:192
本文介绍了自定义的ListView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个code。通过费奥多尔而成,可以发现<一href="http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-ListView">here".

I have a code made by Fedor, it can be found "here".

第一个形象是什么,我现在有,

The first image is what I have now,

和第二图像是我想要实现的目标。

and the second image is what I want to accomplish.

有人能指导我与此有关。我一直在挣扎了几天的时间来解决这个问题。  请帮帮我,在此先感谢!

Can someone guide me with this. I have been struggling for days trying to solve this problem. Please help me, Thanks in advance!

推荐答案

您只需要修改列表项的布局(在item.xml)有另一个ImageView的。

You just need to modify the list item layout (in item.xml) to have another ImageView.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" android:layout_height="wrap_content">
    <ImageView android:id="@+id/image1" android:layout_width="50dip" 
        android:layout_height="50dip" android:src="@drawable/stub" 
        android:scaleType="centerCrop" /> 
    <ImageView android:id="@+id/image2" android:layout_width="50dip" 
        android:layout_height="50dip" android:src="@drawable/stub" 
        android:scaleType="centerCrop" /> 
    <TextView android:id="@+id/text" android:layout_width="fill_parent" 
        android:layout_height="wrap_content" android:layout_weight="1" 
        android:layout_gravity="left|center_vertical" android:textSize="20dip" 
        android:layout_marginLeft="10dip" /> 
</LinearLayout>

和修改LazyAdapter的getView()方法来添加支持第二ImageView的。

and modify LazyAdapter's getView() method to add support for the second ImageView.

这篇关于自定义的ListView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆