• Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying a list of favourites  RSS feed

 
Jake Jameson
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to display a list of favourite recipes so once you click on the favourite button it will be added to favourites and a list of favourites will display once favourites is clicked on

Would anyone be able to help me with the coding, I'm only new to coding so am not very great at it and have to make a cooking application for a project in college

Here is some of my code

Home_Screen.java I've not actually added anything for favourites to it yet as I was having trouble with the coding



home_screen.xml



I used a checkbox for the favourite button



recipe.xml



I've been looking around online and I found a few things but don't understand them

Could someone please help me

Thanks in advance
 
Tim Moores
Saloon Keeper
Posts: 3966
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the code doing now, what should it be doing instead, and where are you stuck making the appropriate changes?
 
Brian Tkatch
Bartender
Posts: 598
26
Linux Notepad Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adding items to a list that will also be displayed is usually done via an adapter with a (saved) data source. It's a little complicated, but there are plenty of tutorials online.
 
Jake Jameson
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't find any easy to understand examples online Brian Tkatch, I've found a few examples on github but don't understand them, do you have any suggestions?
 
Tim Moores
Saloon Keeper
Posts: 3966
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might be a good starting point: http://www.vogella.com/tutorials/AndroidListView/articles.html

That site has lots of useful tutorials.
 
Brian Tkatch
Bartender
Posts: 598
26
Linux Notepad Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, there are so many examples out there and finding the one that's right for you can take a bit of time. Personally, i learned this stuff via Android Essentials, which is available on techtopia here.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!