I'm the one who triggered the duplicate target.
It is your own answer that indicated that a toString
method was necessary, so thank you for your sharing your knowledge, or rather copying your interpretation of the documentation. Stack Overflow, however, receives similar questions daily, even hourly, and it gets tiresome to provide the same answer repeatedly.
We do wish people would debug their code or would read the existing documentation for the referenced classes. Maybe even follow a proper tutorial / course to learn how the internals of the system work. But, everyone learns at their own pace, and that is wishful thinking.
Regarding your statements,
asides from [the toString
method] nothing else is similar
Firstly, I'm honestly not sure what you are making a big deal about this for. I'd understand if you were the person asking the question, and maybe you felt it was wrongfully closed, but you got your answer in, and the poster commented saying providing the toString
method to the object worked. You could have asked the poster to accept your answer and moved on.
Secondly, Android is Java, and that's the common denominator in the problem. The poster was trying to display the list of user-defined Java objects, and was simply unaware of the specifics of the ArrayAdapter
, which you were kind enough to reference the documentation (with a link to site your source). Now - I'll agree that there's probably a better Android-specific duplicate, but for those of us who hang around android / java tags, the problem is similar enough.
Third, notice that the question was closed by 5 different users, each of whom have their own judgment on the matter.
I hope this addresses your concerns, and doesn't dissuade you from continuing to share your knowledge with the community or reach out for any assistance of your own.
.toString()
. (disclaimer, I know nothing of android/java, so this is just an educated guess at most)