How do I get a preference to correlate to variable?
- by Dan T
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?