I have a listview in my Android application.The content displayed inside each elemnent of this list view is simply a String.But for application logic, each listview item needs to have three Strings(Name,id,rating) associated with it, but only one (Name) needts to be displayed.Therefore, this problem can be summarized as follows.
1- Every listview element consists of three Strings
2- Only one is displayed
3- All Strings should be available when an item is clicked
Create a new object to wrap your data in then use a list of these objects for your array adapter:
In your Activity create your list:
Pass this list to your array adapter
Once you are in the Adapter you will use getView
Below is roughly what you should be doing: