Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding a check-list to my Shopping App

 
Rebecca Smith
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

I'm new to android app development and I'm currently creating a shopping list app. So far I'm able to add and delete items from my list view but I now need to add a check-list in order to make my app complete.
Having said this, I'm really stuck on how to add the check-lists to my app. I just need it to be a small tick next to each of my items added to the list.

I know this sounds vague and if you need to see my codes then I'll upload them asap I was just wondering if it was possible to for anyone to show me how to add a check-list with a simple code.
I really hope you guys can help

Thank you!
 
Maneesh Godbole
Saloon Keeper
Posts: 11335
16
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.
Check out http://www.vogella.com/articles/AndroidListView/ for check box items and much more.
 
Rebecca Smith
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your help but I am REALLY new to this and it's confusing me so much to try and add in a checkbox
I've had a look on that website and tried to copy bits of code and stuff but it's not simple enough for me. I followed several tutorials to try and get my app working - which it is but I just need to add this one little detail for it to be complete!
Is there a way that if I show you my code that you could figure out how and where the checkbox code fits in at all?
Thank you
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Noone here will write your code for you. But what we can do is help you get started.

The key is to break the task down into small steps. So step away from the rest of the app for a second and make a new application that just does this checklist display. You will need to come up with two layouts:

1) The main layout will have a ListView
2) The second layout will represent one row in the list. So it should have a checkbox and a textview to display whatever the label for the item should be.

Once you have those views, have a new look at the tutorial and see if you can get them together to form the list you need. If not, show us what you tried and where you are stuck and we can help.
 
Maneesh Godbole
Saloon Keeper
Posts: 11335
16
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So where are you stuck? What is the expected behavior and how does it compare to actual behavior. Please TellTheDetails
From what I understood, your problem is rendering the check box and handling the selection. Is that correct? Once we narrow down on your problem, you can post your code, making sure it is an sscce example
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic