š± App Overview:
This is a BMI (Body Mass Index) Calculator Android App that supports both Metric and Imperial units. It calculates BMI based on user input (age, gender, height, and weight), displays the result, categorizes it, and provides relevant health tips.
š§ Key Functionalities:
1. Unit Switching (Metric ā Imperial):
Toggle between Metric (cm/kg) and Imperial (ft/in/lbs) using a SwitchMaterial.
UI fields update accordingly:
Metric: shows height in cm.
Imperial: shows feet and inches fields.
2. Input Validation:
Validates:
Age (between 2ā120)
Weight:
Metric: 2ā500 kg
Imperial: 5ā1100 lbs
Height:
Metric: 50ā300 cm
Imperial: 1ā10 ft and 0ā11 inches
Displays appropriate error messages if validation fails.
3. BMI Calculation:
Metric formula: BMI = weight (kg) / (height in meters)^2
Imperial formula: BMI = (weight (lbs) Ć 703) / (height in inches)^2
4. BMI Categories:
Based on BMI value:
< 16 ā Severe Thinness
16ā16.9 ā Moderate Thinness
17ā18.4 ā Mild Thinness
18.5ā24.9 ā Normal
25ā29.9 ā Overweight
30ā34.9 ā Obese Class I
35ā39.9 ā Obese Class II
40+ ā Obese Class III
5. Health Tips:
Each BMI category shows related health advice (e.g., "Eat more nutritious food", "Seek medical help", etc.).
6. Result Display:
Displays:
Calculated BMI
User's Age and Gender
BMI Category
Health Tip