I dont know which resource ID is being referred here.
Since you put 0 in the second parameter of the constructor, it will not refer to any layout
as the documentation says:
resource The resource ID for a layout file containing a layout to use when instantiating views.
Now, if you put an existing layout in the constructor, then this layout will be used to create a view of your listViewItems , but you need to override the getView method getView that you can design what text will be placed where in your layout.
If you plan to host an existing layout, use a different constructor on it:
public ArrayAdapter (Context context, int resource, T[] objects)
But for design, I usually donβt add the resource layout to the constructor, but directly inflates the view in your getView method and returns that view.
source share