Morning all,
I was wondering if anyone could help with this?
I'm making a recipe app, the recipe's are stored in an SQLite database.
So far I've managed to get to the stage whereby the user can select a nationality, which is then passed as a query to the db and displays the results in a listview.
Now when the user selects the recipe they want, I want a new activity to open which remembers the user's recipe selection and queries the database for the other fields and displays them on the screen.
This is where I'm stuck !
Some more info (or at least my reasoning)
The database has the following columns (all as text)
Name, Ingredients, Process, Nationality, Cooking Time (and more but boy relevant here)
The nationality query is simple, user selects Indian and the name of any entry that has Indian in the nationality column appears in a listview.
Now say a user selects Madras, I want a new activity to launch (let's call it Recipe) which queries the database for Madras and displays the ingredients, process and cooking time.
I think I can handle the display part, it's just getting the user's selection to the new activity.
The reason why I'm doing it this way is so that I don't need to have an activity for every recipes, instead just one activity that displays what ever the user has selected.
While I'm at it, is there a way to query a db for an exact match but on a different order. So for example if in the ingredients section I could have Chicken, Lemon, Lettuce. If the user did a search on Lemon, Chicken, Lettuce. Would the result still appear despite being in a different order?
Thank you
I was wondering if anyone could help with this?
I'm making a recipe app, the recipe's are stored in an SQLite database.
So far I've managed to get to the stage whereby the user can select a nationality, which is then passed as a query to the db and displays the results in a listview.
Now when the user selects the recipe they want, I want a new activity to open which remembers the user's recipe selection and queries the database for the other fields and displays them on the screen.
This is where I'm stuck !
Some more info (or at least my reasoning)
The database has the following columns (all as text)
Name, Ingredients, Process, Nationality, Cooking Time (and more but boy relevant here)
The nationality query is simple, user selects Indian and the name of any entry that has Indian in the nationality column appears in a listview.
Now say a user selects Madras, I want a new activity to launch (let's call it Recipe) which queries the database for Madras and displays the ingredients, process and cooking time.
I think I can handle the display part, it's just getting the user's selection to the new activity.
The reason why I'm doing it this way is so that I don't need to have an activity for every recipes, instead just one activity that displays what ever the user has selected.
While I'm at it, is there a way to query a db for an exact match but on a different order. So for example if in the ingredients section I could have Chicken, Lemon, Lettuce. If the user did a search on Lemon, Chicken, Lettuce. Would the result still appear despite being in a different order?
Thank you