? 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