0

I have been following this tutorial but I get the error in the title at the line marked below. Any help would be greatly appreciated!

public class ExpenditureArrayAdapter {

    private final Context context;
    private final Expenditure[] values;

    public ExpenditureArrayAdapter(Context context,Expenditure[] values) {
        super(context, R.layout.list_expenditures, values); <----
        this.context = context;
        this.values = values;
    }
}

1 Answer 1

1

Looks like you forgot to extend ArrayAdapter. Currently your ExpenditureArrayAdapter class inherits from Object, which has no constructor Object(Context, int, T[]).

Change

public class ExpenditureArrayAdapter {

to

public class ExpenditureArrayAdapter extends ArrayAdapter {

and it should fix your problem.

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.