I have in my app a ListView with adapter, I use this to show a list with a chechbox and a textView
public class MyListAdapter extends ArrayAdapter<Model> {
private LayoutInflater inflater;
private int position;
public int getPosition() {
return position;
}
public void setPosition(int position) {
this.position = position;
}
public MyListAdapter (Context context, List<Model> listMeasurement){
super(context, R.layout.simplerow, R.id.empty, listMeasurement);
inflater= LayoutInflater.from(context);
}
public View getView(int position, View convertView, ViewGroup parent){
Model model= (Model)this.getItem(position);
CheckBox checkBox;
TextView textView;
}
}
My question is:
I want to show another list in another activity, this will have an image, two textViews and a button. The image depends on the value of the textView.
The best way to do this is do other ArrayAdapter? or use other things?
Thanks in advance.
You need to extend the
BaseAdapterand override thegetView()method. Here is a sample.