This is my code:
public class BusinessAdapter extends ArrayAdapter<String[]> {
private final Context context;
String[] dataList;
public BusinessAdapter(Context context, String[] dataList) {
super(context, R.layout.business_row,dataList);
this.context = context;
this.dataList = dataList;
}
I am getting an error in super. It says that I must remove dataList from its arguments. So far, I am using the same code for creating ListView adapters and I didn’t have any problem. Can you see any mistake?
I have cleaned the project but nothing changed.
As seen in the documentation the constructor you are calling wants as last argument an array of the generic type. In your case it wants an array of a string array. One possible solution would be to change your class to
... extends ArrayAdapter<String> {. If that is not possible you could change theBusinessAdapterconstructor topublic BusinessAdapter(Context context, String[][] dataList).