BMI Calculator: My First Android App
Okay, after Oracle went after google for patent rights i got interested in android more than ever so decided to jump right in and program something. Following is my first app: BMI Calculator
- Calculates BMI (Body Mass Index).
- Support multiple unit systems
- Bells and Whistles:
- Changing Unit System automatically changes the units inside Height and Weight field labels
- Gender Spinner data is read from @arrays/gender_list. This was not needed, just did it to learn how one can read XML and attach an adapter to it.
- Gender Spinner’s Prompt reads from @strings/select_gender. This was needed and done.
- Height and Weight EditText allows 6 characters, single line and decimal
- Hitting Calculate button without inputting any data causes Result’s TextView to show an error.
- Incorporate Gender when doing BMI Calculation
Tags: android, bmi, google, height, java, Open Source, oracle, weight, xml