
这是我的列表,带有复选框和3个textviews.
这是listview的适配器类:
package android.virtus;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.TextView;
public class Adapter extends BaseAdapter{
private Context context;
LayoutInflater inflater;
CheckBox box;
String textView1[], textView2[], textView3[];
public Adapter(Context c, CheckBox cb, String textView1[], String textView2[], String textView3[]) {
this.context=c;
this.box=cb;
this.textView1=textView1;
this.textView2=textView2;
this.textView3=textView3;
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return textView1.length;
}
@Override
public Object getItem(int arg0) {
// TODO Auto-generated method stub
return null;
}
@Override …Run Code Online (Sandbox Code Playgroud) android ×1