Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

Android studio. Java. I want to create a category and store it in room database. Once category is created the user will be able to view it in a listview. After that, onclickitem from list view user is directed to another activity where they can add item to the clicked category and add items to that category only. Please help. I managed to add items to room database but I want to see data for category clicked on from listview and not show the same data for all.



What I have tried:

I managed to add items to room database but I want to see data for category clicked on from listview and not show the same data for all. 
Posted
Comments
Richard MacCutchan 30-Apr-22 4:00am    
You need to have a click handler for the ListView. When an item is clicked you get that item's details from the database and display it in a new view.
Userrw 30-Apr-22 4:14am    
Thank you. Much appreciated.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900