I have a question about adding spinner to listview header:
- How should I get a spinner to showup in the listview header.
- How to dynamically populate values in this spinner based on values in the listview.
Description: I have a listview which populates values from an XML file (placed on the net). This list can be huge based on user selection on previous screen(s) and/ or data in XML file.
I would like to add a spinner at the top of the listview such that user will have an option to perform filter action/ sort action. How should this be achieved?
For example: If my app shows a list of books available in the library. The spinner should help user to: 1. Sort alphabetically based on book title 2. Sort alphabetically based on author name 3. Filter out only books related to 'War' 4. Filter out only books related to 'History' 5. Filter out only books related to 'Science'
When I am populating the listview, the XML provides details such as 'Type of Book', 'Author', 'Title', etc.
Question is, how do I place a spinner at the top & populate values like, the types (War, History, Crime, etc.) to the Spinner based on the list of books in the listview.
I have tried to be as descriptive as possible. If any further details required, please let me know.
Any help will be highly appreciated.
Thanks a Bunch!