I have an array of Password objects, each containing a tag, a username and a password (all of three Strings).
I’d like to display the tags contained in each Password in a ListView.
I thought about using an ArrayAdapter linked to a String array containing only the tags, but I’m almost sure this would be a bad option as I plan to update frequently the Password array’s contents.
Is there any other option to bind my Password array to a ListView and making it display only its tag attribute?
The simplest solution:
Step #1: Implement
toString()onPasswordto returntagStep #2: Put your
Passwordobjects in anArrayList<Password>Step #3: Put your
ArrayList<Password>into anArrayAdapter<Password>Step #4: Put your
ArrayAdapter<Password>into yourListView