-2

I am going to write a BMI app and I would like to allow the user to enter weight and height in either U.S. units or metric. I am not sure what is the best way to go about this because I would also like to be able for the user to save their preference. Should I use a switch widget? Thanks in advance. Also not sure if I am asking in the right place.

CCat
  • 123
  • 10

2 Answers2

1

Use Radio Buttons to get the user preference.

Save the user preference in SharedPreferences.

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
Aditya Desai
  • 415
  • 1
  • 6
  • 14
0

you can use toggle button in android to switch kilos to pound if you want good ui use this link for toggle button Example on ToggleButton

Community
  • 1
  • 1
android_jain
  • 788
  • 8
  • 19