0

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!

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.