Reputation: 77
I'm trying to use ListView with custom ArrayAdapter, however when I try to call super in the constructor, it gives me this error :
cannot resolve method'(android.content.Context, int, java.lang.String)
Here's my piece of code
public class MobileArrayAdapter extends ArrayAdapter<String> {
private final Context context;
private final String values;
public MobileArrayAdapter(Context context, String values) {
super(context, R.layout.activity_second,values);
this.context = context;
this.values = values;
}
what did I miss? thanks in return!
Upvotes: 0
Views: 1841
Reputation: 3663
You constructor should pass a String array or String Arraylist in super.
The error says that you don't have a super constructor with just a string as a parameter
Upvotes: 1