I am developing an Android application and now I have implemented a ListView that shows a list of courses related to the database.
I would like to know how to include a hidden identifier with the name (which comes from db) so that after the user clicks on the elements, the application will switch to the relative representation of the selected courses.
And how can I maintain the identifier while navigating inside the course?
At the moment, my code just loads the name of the courses from db and is set as a list:
ArrayAdapter<String> result = new ArrayAdapter<String>(CourseActivity.this, android.R.layout.simple_list_item_1); for (CourseRecord c : get()) result.add(c.getFullname()); lv.setAdapter(result);
Obviously, I can do c.getid () as well, but I'm not where I need to put the identifier.
Thank you very much.
PS: Maybe someone has really good list browsing graphics?
source share