Navigation & UI Structure
Relevant source files
The following files were used as context for generating this wiki page:
- app/src/main/kotlin/com/shadowcheck/mobile/rebuilt/presentation/MainActivity.kt
- app/src/main/kotlin/com/shadowcheck/mobile/ui/Sidebar.kt
- app/src/main/kotlin/com/shadowcheck/mobile/rebuilt/ui/screens/HomeScreen.kt
- app/src/main/kotlin/com/shadowcheck/mobile/rebuilt/ui/screens/SettingsScreen.kt
- app/src/main/kotlin/com/shadowcheck/mobile/rebuilt/ui/theme/ThemeConfig.kt
- app/src/main/kotlin/com/shadowcheck/mobile/rebuilt/ui/screens/ComprehensiveThemeEditor.kt
Introduction
The ShadowCheck Mobile application utilizes a modern Android UI architecture based on Jetpack Compose and the Material 3 design system. Navigation is centralized through a NavHost implementation that manages transitions between various SIGINT (Signals Intelligence) analysis screens, including network lists, mapping, and security threat detection.
The user interface is structured around a persistent, animated sidebar navigation system that allows users to switch between high-level modules such as WiFi scanning, Bluetooth device tracking, and temporal heatmaps. This architecture supports a complex feature set ranging from real-time wardriving to advanced theme customization and database management.
Sources: MainActivity.kt:1-50, README.md:10-30
Core Navigation Architecture
NavHost and Route Management
The application's navigation is defined within the MainScreen composable using a NavController and NavHost. It maps string-based routes to specific screen composables. Navigation state, specifically the currentRoute, is tracked to synchronize the UI state of the sidebar and top bars.
The diagram shows the top-level routing logic handled by the NavHost.
Sources: MainActivity.kt:60-170
Sidebar Navigation System
The Sidebar component provides the primary navigation interface. It is implemented as a collapsible drawer with a spring-animated offset. It includes a list of SidebarItem components and a global "Start/Stop Scanning" button that interacts with the background scanning service.
| Component | Description | Icons Used |
|---|---|---|
| Sidebar | Main container for navigation links and scan control. | Menu, ChevronLeft |
| SidebarItem | Individual navigation link with selection highlighting. | Home, Wifi, Bluetooth, CellTower, etc. |
| Scanner Toggle | Global button to trigger the CompleteScannerService. | PlayArrow, Stop |
Sources: Sidebar.kt:15-80, MainActivity.kt:180-210
UI Components & Layouts
Screen Structure Patterns
Most screens follow a standardized layout pattern using Compose Column and Surface components:
- TopAppBar: Displays the screen title, back navigation (where applicable), and contextual actions (e.g., "Show on Map").
- Content Area: A scrollable column containing information grouped into Material 3
Cardcomponents. - Detail Rows: Standardized
Rowlayouts for displaying key-value pairs of signal or network data.
This sequence illustrates the interaction between the user interface and the navigation controller.
Sources: MainActivity.kt:185-230, UnifiedDetailScreen.kt:20-60, NetworkDetailsScreen.kt:25-70
Theming and Customization
The UI is highly customizable through a ThemeConfig system. This allows for persistent storage of colors, button radii, and icon choices. A dedicated ComprehensiveThemeEditor provides a live preview for adjusting the UI's look and feel.
- Dynamic Colors: Primary, Accent, Surface, and Background colors can be adjusted.
- Element Styles: Per-screen customization for
homeScreenCards,listScreenCards, andsidebarItems. - Icon Mapping: Users can choose which vector icons represent specific network types (e.g., choosing between different WiFi icon variants).
Sources: ThemeConfig.kt:15-110, ComprehensiveThemeEditor.kt:35-100
Data Presentation Layouts
Statistics and Dashboard
The HomeScreen and StatsScreen use a grid of StatCard components to display real-time counts of unique and total network sightings. These components utilize a rainbowShimmer modifier for visual emphasis when scanning is active.
@Composable
fun StatCard(icon: ImageVector, unique: Int, total: Int, label: String, onClick: () -> Unit = {}) {
Card(
modifier = Modifier.width(100.dp).height(140.dp).clickable { onClick() },
colors = CardDefaults.cardColors(containerColor = ShadowCheckColors.Surface.copy(alpha = 0.7f))
) {
// Content showing unique/total counts
}
}
Sources: HomeScreen.kt:115-135, StatsScreen.kt:70-85
Heatmaps and Map Views
For spatial and temporal data, the UI provides:
- MapScreen: A placeholder for Mapbox/Google Maps integration featuring a legend for WiFi, BT, and Cellular markers.
- HeatmapScreen: A custom
Canvas-based temporal heatmap displaying network activity by day and hour.
Sources: MapScreen.kt:110-150, HeatmapScreen.kt:150-200
Conclusion
The Navigation & UI Structure of ShadowCheck Mobile is designed for rapid access to signals intelligence. By combining a centralized navigation host with a highly flexible theming engine and specialized data visualization screens, the architecture supports both casual monitoring and in-depth technical analysis of wireless environments.
Sources: README.md:15-25, MainActivity.kt:55-60