I am looking at this ListView
Tutorial:
ListView Tutorial
and I was wondering how much better is to create my own ArrayAdapter
, rather than just using and ArrayAdapter
.
In the Tutorial it defines a "StableArrayAdapter
", what exactly does this means? If I use a regular ArrayAdapter
, could it be dangerous for some reason?
The two previous answers are absolutely right, but just to address more directly your question and in case someone else has the same doubt than you; a regular ArrayAdapter is not dangerous at all, the only "problem" is that it might not fulfill your needs, in which case you will have to create your own adapter, as the author of the tutorial did by creating what he called StableArrayAdapter in the end of the ListViewExampleActivity class.
Don't get lost by the name, which I guess comes from the fact that the overwritten method "hasStableIds" always returns true, it doesn't mean that the regular ArrayAdapter creates problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With