Reputation: 16758
I am extending ArrayAdapter:
public class ImgItemAdapter extends ArrayAdapter<ImageData>
I am trying to implement its constructor:
public ImgItemAdapter(Context context, int textViewResourceId, String[] imageArray) {
super(context, textViewResourceId, imageArray);
inflator = ((Activity)context).getLayoutInflater();
imgUrlArray = imageArray;
}
Problem is - when I am trying to compile it is giving me this error message:
Error:(28, 9) cannot find symbol constructor ArrayAdapter(android.content.Context,int,java.lang.String[])
Any ideas?
Here is my source code: Sample Code
Upvotes: 0
Views: 724
Reputation: 1076
You are calling super(context, textViewResourceId, imageArray);
and you received that error meaning that such constructor with the provided parameters does not exist in the super class which is ArrayAdapter
. Also check the docs to see the correct arguments of the constructors.
Upvotes: 1