I want to implement CustomArrayAdapter and following is the constructor I have written for my custom adapter
public CustomUsersAdapter(Context context, Array
I dont know which resource ID is being referred here.
Since you put 0
in the second parameter of the constructor it wont have any reference to any layout
as the documentation is saying:
resource The resource ID for a layout file containing a layout to use when instantiating views.
Now if you put an existing layout to the constructor then that layout will be use to instantiate the view of your listViewItems
but you need to override the getView
method to enable you to design which text goes where in your layout.
If you are planning to put an existing layout then use another constructor on it:
public ArrayAdapter (Context context, int resource, T[] objects)
But for design I wont really add any resource layout to the constructor but directly inflate the view in your getView
method and return that view.