How do I get a preference to correlate to variable?
Posted
by Dan T
on Stack Overflow
See other posts from Stack Overflow
or by Dan T
Published on 2010-06-09T04:48:12Z
Indexed on
2010/06/09
4:52 UTC
Read the original article
Hit count: 235
I have my menu button bringing up a Settings option, which brings up numerous ListPreferences such as weight and various sizes for glasses (it's a BAC calculator app). I'll pick one example... weight will work.
Depending on how much you weigh it will affect your BAC. I have a int for Weight, set at 180. I would like someone to be able to go into the menu Settings, pick the "Weight" ListPreference, and choose between 100, 130, 150, 180, 210, 240, 270, and 300. I already have the numbers show up (all of the arrays have been created) and I can choose one, but it doesn't do anything because it's not linked up with the int Weight variable. How do I go about linking the information?
© Stack Overflow or respective owner