From 9e3978f2613a2966fcbf393860439aceea124742 Mon Sep 17 00:00:00 2001 From: Nishant Mishra Date: Thu, 3 Jul 2025 15:51:14 +0530 Subject: [PATCH] Add placeholders for stats and settings screens Upcoming features sneak peek!!1!1!! --- .../java/org/nsh07/pomodoro/MainActivity.kt | 6 +++ .../java/org/nsh07/pomodoro/ui/AppScreen.kt | 8 ++-- .../ui/settingsScreen/SettingsScreen.kt | 44 +++++++++++++++++++ .../pomodoro/ui/statsScreen/StatsScreen.kt | 44 +++++++++++++++++++ app/src/main/res/drawable/monitoring.xml | 13 ++++++ .../main/res/drawable/monitoring_filled.xml | 13 ++++++ 6 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 app/src/main/java/org/nsh07/pomodoro/ui/settingsScreen/SettingsScreen.kt create mode 100644 app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/StatsScreen.kt create mode 100644 app/src/main/res/drawable/monitoring.xml create mode 100644 app/src/main/res/drawable/monitoring_filled.xml diff --git a/app/src/main/java/org/nsh07/pomodoro/MainActivity.kt b/app/src/main/java/org/nsh07/pomodoro/MainActivity.kt index 3bcc06d..debdb73 100644 --- a/app/src/main/java/org/nsh07/pomodoro/MainActivity.kt +++ b/app/src/main/java/org/nsh07/pomodoro/MainActivity.kt @@ -28,6 +28,12 @@ class MainActivity : ComponentActivity() { R.drawable.hourglass_filled, "Timer" ), + NavItem( + Screen.Stats, + R.drawable.monitoring, + R.drawable.monitoring_filled, + "Stats" + ), NavItem( Screen.Settings, R.drawable.settings, diff --git a/app/src/main/java/org/nsh07/pomodoro/ui/AppScreen.kt b/app/src/main/java/org/nsh07/pomodoro/ui/AppScreen.kt index 0436408..afbfb1e 100644 --- a/app/src/main/java/org/nsh07/pomodoro/ui/AppScreen.kt +++ b/app/src/main/java/org/nsh07/pomodoro/ui/AppScreen.kt @@ -31,6 +31,8 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.delay import kotlinx.coroutines.withContext import org.nsh07.pomodoro.MainActivity.Companion.screens +import org.nsh07.pomodoro.ui.settingsScreen.SettingsScreen +import org.nsh07.pomodoro.ui.statsScreen.StatsScreen import org.nsh07.pomodoro.ui.timerScreen.TimerScreen import org.nsh07.pomodoro.ui.viewModel.UiViewModel @@ -64,7 +66,7 @@ fun AppScreen( val selected = backStack.last() == it.route ShortNavigationBarItem( selected = selected, - onClick = if (it.route != Screen.Timer) { + onClick = if (it.route != Screen.Timer) { // Ensure the backstack does not accumulate screens { if (backStack.size < 2) backStack.add(it.route) else backStack[1] = it.route @@ -105,11 +107,11 @@ fun AppScreen( } entry { - Text("Settings") + SettingsScreen() } entry { - Text("Stats") + StatsScreen() } } ) diff --git a/app/src/main/java/org/nsh07/pomodoro/ui/settingsScreen/SettingsScreen.kt b/app/src/main/java/org/nsh07/pomodoro/ui/settingsScreen/SettingsScreen.kt new file mode 100644 index 0000000..6dfd860 --- /dev/null +++ b/app/src/main/java/org/nsh07/pomodoro/ui/settingsScreen/SettingsScreen.kt @@ -0,0 +1,44 @@ +package org.nsh07.pomodoro.ui.settingsScreen + +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.LoadingIndicator +import androidx.compose.material3.LocalTextStyle +import androidx.compose.material3.MaterialTheme.typography +import androidx.compose.material3.Text +import androidx.compose.material3.TopAppBar +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.sp +import org.nsh07.pomodoro.ui.theme.AppFonts.robotoFlexTitle + +@OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun SettingsScreen(modifier: Modifier = Modifier) { + Column(modifier) { + TopAppBar( + title = { + Text( + "Settings", + style = LocalTextStyle.current.copy( + fontFamily = robotoFlexTitle, + fontSize = 32.sp, + lineHeight = 32.sp + ) + ) + }, + subtitle = {}, + titleHorizontalAlignment = Alignment.CenterHorizontally + ) + Box(contentAlignment = Alignment.Center, modifier = Modifier.fillMaxSize()) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + LoadingIndicator() + Text("Coming Soon", style = typography.headlineSmall, fontFamily = robotoFlexTitle) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/StatsScreen.kt b/app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/StatsScreen.kt new file mode 100644 index 0000000..43cdb03 --- /dev/null +++ b/app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/StatsScreen.kt @@ -0,0 +1,44 @@ +package org.nsh07.pomodoro.ui.statsScreen + +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.LoadingIndicator +import androidx.compose.material3.LocalTextStyle +import androidx.compose.material3.MaterialTheme.typography +import androidx.compose.material3.Text +import androidx.compose.material3.TopAppBar +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.sp +import org.nsh07.pomodoro.ui.theme.AppFonts.robotoFlexTitle + +@OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun StatsScreen(modifier: Modifier = Modifier) { + Column(modifier) { + TopAppBar( + title = { + Text( + "Stats", + style = LocalTextStyle.current.copy( + fontFamily = robotoFlexTitle, + fontSize = 32.sp, + lineHeight = 32.sp + ) + ) + }, + subtitle = {}, + titleHorizontalAlignment = Alignment.CenterHorizontally + ) + Box(contentAlignment = Alignment.Center, modifier = Modifier.fillMaxSize()) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + LoadingIndicator() + Text("Coming Soon", style = typography.headlineSmall, fontFamily = robotoFlexTitle) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable/monitoring.xml b/app/src/main/res/drawable/monitoring.xml new file mode 100644 index 0000000..f90f7dc --- /dev/null +++ b/app/src/main/res/drawable/monitoring.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/app/src/main/res/drawable/monitoring_filled.xml b/app/src/main/res/drawable/monitoring_filled.xml new file mode 100644 index 0000000..0ae8bda --- /dev/null +++ b/app/src/main/res/drawable/monitoring_filled.xml @@ -0,0 +1,13 @@ + + + + +