๐ฑ 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
BMI Calculator with unit switch, input validation, and health tips.