Android Question Using array as label number

Dman

Active Member
Licensed User
Longtime User
I will try to explain this correctly.

I have 5 check boxes with colors and I also have 5 labels. When populating the labels with the color value, the colors are always in the same order. Everything works fine when all colors are selected. But if only colors 1, 3 and 5 are selected I would like to only populate the first 3 labels instead of populating label1, label3 and label5. I know there is an easy way to do this but I just can't think of it right now.

I am assuming that I need to use an array. My labels are named label1, label2, etc so I thought that I could count the colors selected, and use the colorcount in an array of some sorts. I don't know....

Thanks in advance.
 
Last edited:

Dman

Active Member
Licensed User
Longtime User
Here is a test project. It appears I have it working but I'm not sure if this is the best way to go about it.
 

Attachments

  • TestColors.zip
    9.5 KB · Views: 208
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…