Question
I need help with linking specific buttons to a new activity that displays a listview for specific database entries in android studio. IDK if that
I need help with linking specific buttons to a new activity that displays a listview for specific database entries in android studio. IDK if that makes sense. My android app is java based btw.
My mainactivity has 4 buttons(category's)- bread, fruit, veggies, and soup. my database runs off of mainactivity2 where I have a form to input new recipies. I would like for those 4 buttons to open separate activities to display recipes depending on the category. I named the 4 new activities after their respective category name. Each of the new activities have a list view that I would like to populate with the corresponding recipes from the database.
the database table information includes: Id, recipeName, category, ingredients, and instructions. idk if that helps any.
I don't know how to do what I want to do and all the tutorials in the world do not help. it literally took me 3 weeks to figure out how to get my database working.
As of now my buttons open up their corresponding activity/pages, but like I said, I need some help to figure out how to get the list views on those activities to pull information and display from the database. Thank you for your time and help.
I figured out the answer on my own. I didn't want to copy and paste the assignment like everyone else because all the expert answers were wrong. This is an android application assignment, not a java console program. Thanks.
The assignment details were:
Link the buttons that you created in Unit 2 to the corresponding recipe category in a local database.
When the button is activated, the recipes should appear on a new page, one record at a time.
Add Next and Previous buttons on that page to allow the user to navigate through the recipes in the current category.
The database queries should use AsyncTask to perform the queries in a background thread like the code completed in the Unit 4 assignment.
Test the application in the Android Phone Emulator.
Create screenshots of all of the relevant screens of your running application and save them in a Word document named "yourname_ITSD427_IP5.docx." You should also use this document to describe the work you performed for this assignment, with specific details regarding the locations and changes of the code that you created and modified.
Save and close the project.
Create a distribution package for your application.
Zip the entire project, including your screenshots and work description, the project files, and your deployment package to a file named "yourname_ITSD427_IP5.zip," and submit the zip file to the dropbox.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started