Features
Counter interface
The main counting interface displays: Central counter circle- Large, tappable circular button (220dp diameter)
- Current count displayed in bold, large font
- “Tap to count” instruction text
- Circular progress ring showing completion percentage
- Gradient border effect
- Background ring in surface variant color
- Animated progress arc with sweep gradient effect
- Colors transition from primary to gold to indicate progress
- Turns green when target count is reached
- 8dp stroke width for clear visibility
- Arabic text in Amiri font (extra large size)
- Gold color for Arabic text
- Translation in body medium style
- Target count indication
Preset phrases
The app includes five default presets:-
SubhanAllah (سُبْحَانَ اللَّهِ)
- Translation: “Glory be to Allah”
- Target: 33 times
- Category: After Prayer
- Reference: Sahih Muslim
-
Alhamdulillah (الْحَمْدُ لِلَّهِ)
- Translation: “All praise is due to Allah”
- Target: 33 times
- Category: After Prayer
- Reference: Sahih Muslim
-
Allahu Akbar (اللَّهُ أَكْبَرُ)
- Translation: “Allah is the Greatest”
- Target: 34 times
- Category: After Prayer
- Reference: Sahih Muslim
-
La ilaha illallah (لَا إِلَهَ إِلَّا اللَّهُ)
- Translation: “There is no god but Allah”
- Target: 100 times
- Category: Daily
- Reference: Sahih Bukhari
-
Astaghfirullah (أَسْتَغْفِرُ اللَّهَ)
- Translation: “I seek forgiveness from Allah”
- Target: 100 times
- Category: Daily
- Reference: Sahih Muslim
Statistics tracking
Three live statistics are displayed:- Today: Total count for the current day (updates in real-time)
- Rounds: Number of complete laps (target count reached)
- Sessions: Total completed tasbih sessions
Preset categories
Presets are organized into categories:- Daily: Regular daily dhikr
- After Prayer: Recited after completing prayers
- Morning: Morning remembrance
- Evening: Evening remembrance
- Custom: User-created presets
How users interact
Counting dhikr
- Select a preset: Tap any preset chip from the horizontal scrolling list
- Start counting: Tap the large circular counter button
- Watch progress: Observe the progress ring fill up
- Complete rounds: When target is reached, the counter resets and rounds increase
- Continue: Keep tapping for multiple rounds
Managing presets
Switch between presets:- Scroll through the preset chips horizontally
- Selected preset has primary container background
- Selected preset shows primary colored border
- Chip displays Arabic text and target count (e.g., “33x”)
- Tap the add icon (+) in the top app bar
- Navigate to the add preset screen
- Enter custom dhikr details
- Custom presets appear in the same scrollable list
Control buttons
Three circular control buttons are provided: Reset button (red icon)- Clears current count and rounds
- Starts fresh session
- Tap to reset to zero
- Enabled: Volume up icon (full opacity)
- Disabled: Volume off icon (40% opacity)
- Plays sound feedback on each count
- Enabled: Phone icon (full opacity)
- Disabled: Phone icon (40% opacity)
- Provides haptic feedback on each tap
Session management
Active session tracking:- App automatically tracks session data
- Records preset used, count, target, and duration
- Calculates total laps (rounds completed)
- Stores timestamp for history
- Session marked complete when target reached
- Completion time recorded
- Optional notes can be added
- Saved to session history
Viewing history
- Tap the history icon in the top app bar
- View past tasbih sessions
- See completed counts and dates
- Track progress over time
Progress visualization
Progress calculation
- Clamped between 0.0 and 1.0
- Animated with 300ms tween
- Updates smoothly as count increases
Color states
Progress ring colors:- In progress: Primary color → Gold gradient
- Complete: Green color throughout
- Background: Surface variant color
- Default: Outline color, 20dp size
- Facing Qibla: Green color, 28dp size with mosque icon
Completion animation
When target count is reached:- Progress ring turns green
- Animated color transition
- Visual feedback confirms milestone
- Rounds counter increments
- Count resets to 0 for next round
Preset data structure
Each preset contains:- ID: Unique identifier
- Name: Display name
- Arabic text: Original Arabic dhikr
- Transliteration: Romanized pronunciation
- Translation: English meaning
- Target count: Goal number of repetitions
- Category: Grouping category
- Reference: Hadith source
- Display order: Sorting position
- Created/Updated timestamps
Technical implementation
Relevant source files:TasbihModels.kt- Data models and presetsTasbihScreen.kt- Main counter UITasbihHistoryScreen.kt- Session historyAddPresetScreen.kt- Custom preset creationTasbihViewModel.kt- State management
CounterCircle- Tappable counter with progress ringDhikrDisplay- Arabic text and translation displayPresetChip- Selectable preset cardsControlButtons- Reset and feedback toggles