Closed thofnar closed 8 years ago
@alexwalterbos I'm back at it with this custom adapter but it seems I've really broken it this time. The cards are no longer displayed, any ideas what it could be? I've spent the better part of today on this and I am completely out of ideas :(
This time it looks like getView, inside the JobAdapter is not being called at all even thought there are 2 records in the jobs arraylist that is passed to it.
Collect cards data before bind layout.
You're not using position
but you're getting Job 0
because you use Job j = jobs.get(0)
. Should probably be jobs.get(position)
.
Hope this helps! Also:
`LayoutInflater inflater = (LayoutInflater) context.getSystemService((Activity.LAYOUT_INFLATER_SERVICE));`
Protip: Instead of calling the SystemService
, you can get a LayoutInflater
more cleanly with LayoutInflater.from(Context context)
Hi,
I had a custom adapter working fine for a while, but now it seems to have stopped. I don't get any errors, the cards just don't show up in the app at all.
This is my custom ArrayAdapter:
And this is how I am setting the custom adapter from an AsyncTask in my activity:
The jobcard layout xml:
Any ideas what the issue could be?
Thanks in advance!