我有一个自定义适配器:
public class PhraseCustomAdapter extends BaseAdapter
{
public String original[];
public String translation[];
public String transcription[];
public Activity context;
public LayoutInflater inflater;
public PhraseCustomAdapter(Activity context,String[] original, String[] translation, String[] transcription) {
super();
this.context = context;
this.original = original;
this.translation = translation;
this.transcription = transcription;
inflater = LayoutInflater.from(context);
this.inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return original.length;
}
@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return position;
}
public String …Run Code Online (Sandbox Code Playgroud)