Features
Result summary card
A prominent gold gradient card displays:- Zakat due amount: Large, bold display of calculated Zakat
- Percentage: “2.5% of eligible wealth” explanation
- Nisab status: Whether wealth exceeds the nisab threshold
- Nisab type: Gold or Silver standard used
- Nisab value: Current threshold amount in user’s currency
Nisab type selector
Two options for nisab calculation: Gold nisab- Weight: 87.48 grams (7.5 tola)
- Updates with current gold price per gram
- Typically results in higher threshold
- Displayed with gold accent color
- Weight: 612.36 grams (52.5 tola)
- Updates with current silver price per gram
- Generally results in lower threshold
- Displayed with silver accent color
Assets section
Comprehensive input fields for all zakatable assets: Cash and liquid assets- Cash on hand (physical currency)
- Bank balance (all accounts combined)
- Gold (entered in grams, converted to value)
- Silver (entered in grams, converted to value)
- Investments (stocks, bonds, mutual funds)
- Business inventory (goods held for trade)
- Receivables (money owed to you)
- Rental income (from properties)
- Any other zakatable assets
- Colored icon representing the asset type
- Asset label and description hint
- Compact amount input field with currency prefix
- Real-time total calculation
Liabilities section
Debt and liability inputs: Deductible liabilities- Debts owed (personal debts)
- Loans (bank or personal loans)
- Bills due (outstanding bills)
- Other liabilities
Calculation breakdown
A detailed breakdown card shows:- Total assets: Sum of all asset values
- Total liabilities: Sum of all debts (shown with minus)
- Net zakatable wealth: Assets minus liabilities
- Nisab threshold: Current nisab value
- Meets nisab: Yes/No indicator (green/red)
- Zakat due: Final 2.5% calculation
How users interact
Initial calculation
- Select nisab type: Choose gold or silver standard
- Enter assets: Input all applicable asset values
- Enter liabilities: Input any debts or liabilities
- View result: Zakat amount calculates automatically
Input management
Entering values:- Tap any input field to activate keyboard
- Enter numeric values (decimal supported)
- Currency prefix ($) displays automatically
- For metals, enter weight in grams with “g” suffix
- Empty fields treated as zero
- Zakat updates instantly as values change
- No calculate button needed
- All displays refresh automatically
- Progress tracked in real-time
Saving calculations
- Review the calculation breakdown
- Tap “Save Calculation” button at the bottom
- Calculation saved to history with timestamp
- Includes all entered values and results
Accessing history
- Tap the history icon in the top app bar
- View previous Zakat calculations
- See dates and amounts from past calculations
- Track Zakat payments over time
Resetting calculator
- Tap the refresh icon in the top app bar
- All input fields clear to zero
- Calculation resets
- Start fresh calculation
Calculation method
Nisab threshold
Net worth calculation
Zakat due
Metal value conversion
Input card design
Each input card features: Visual elements:- Icon in colored rounded square (40dp)
- Two-line text (label and hint)
- Compact input field (100dp width)
- Rounded corners (14dp radius)
- Surface container high background
- Cash: Gold accent
- Investments: Primary color
- Liabilities: Red/error color
- Metals: Gold/silver accent colors
- Displays current value or zero placeholder
- Currency prefix for monetary values
- Weight suffix (“g”) for metals
- Decimal keyboard for numeric entry
- Right-aligned text display
Breakdown display
The breakdown section provides transparency: Visual hierarchy:- Section title: “Calculation Breakdown”
- Rounded card with padding
- Rows with label and value pairs
- Horizontal dividers for sections
- Bold text for key totals
- Assets: Primary color
- Liabilities: Error/red color (with minus)
- Net worth: Default color, bold
- Nisab status: Primary (yes) or error (no)
- Zakat due: Gold color, bold
- Full-width primary colored card
- Centered white text
- “Save Calculation” label
- Rounded corners
- Tappable for saving
Technical implementation
Relevant source files:ZakatModels.kt- Data models and calculatorZakatCalculatorScreen.kt- Main calculator UIZakatHistoryScreen.kt- Saved calculationsZakatViewModel.kt- State management
ZakatAssets- All asset categoriesZakatLiabilities- All liability categoriesZakatCalculation- Complete calculation resultNisabType- Gold or Silver enumerationMetalPrice- Current metal prices
- Rate: 2.5% (0.025)
- Gold nisab: 87.48 grams
- Silver nisab: 612.36 grams