I have an ArrayList filled with objects of a class, I try to show it on a ListView but I get something weird in return I get the address of the class like project.Class@"alphanumeric" on the first and only line of the ListView Here is the code I've got
private ListView lvWords;
private Word word;
private pWord pword;
private ArrayList<Word> words;
and my onCrete method has this
this.lvWords=(ListView) this.findViewById(R.id.lvWords);
this.pword=new oWord(this);
this.words=new ArrayList<Word>();
this.words=pword.ReturnArrayList();
ArrayAdapter<Word> adapter= new ArrayAdapter<Word>(this, android.R.layout.simple_list_item_1, words);
this.lvWords.setAdapter(adapter);
pword.ReturnArrayList() gets all the words of the database and stores it into a cursor and then each element is converted in a Word object and stored in the array
I'd also like to update it with a button or something