I want to implement CustomArrayAdapter and following is the constructor I have written for my custom adapter
public CustomUsersAdapter(Context context, Array
You need to us your layout file in that constructor. So you need to change your constructor from
public CustomUsersAdapter(Context context, ArrayList users) {
super(context, 0, users);
}
to
public CustomUsersAdapter(Context context, int resLayout , ArrayList users) {
super(context, resLayout , users);
}
resLayout
is the ID for your layout xml file which will be in your custom adapter class.
And the Syntax for ArrayAdapter
is
public ArrayAdapter (Context context, int resource, T[] objects)
For more info you can check this