Add placeholders for stats and settings screens
Upcoming features sneak peek!!1!1!!
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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<Screen.Settings> {
|
||||
Text("Settings")
|
||||
SettingsScreen()
|
||||
}
|
||||
|
||||
entry<Screen.Stats> {
|
||||
Text("Stats")
|
||||
StatsScreen()
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
13
app/src/main/res/drawable/monitoring.xml
Normal file
13
app/src/main/res/drawable/monitoring.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:tint="#000000"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M160,840q-17,0 -28.5,-11.5T120,800v-40q0,-17 11.5,-28.5T160,720q17,0 28.5,11.5T200,760v40q0,17 -11.5,28.5T160,840ZM320,840q-17,0 -28.5,-11.5T280,800v-220q0,-17 11.5,-28.5T320,540q17,0 28.5,11.5T360,580v220q0,17 -11.5,28.5T320,840ZM480,840q-17,0 -28.5,-11.5T440,800v-140q0,-17 11.5,-28.5T480,620q17,0 28.5,11.5T520,660v140q0,17 -11.5,28.5T480,840ZM640,840q-17,0 -28.5,-11.5T600,800v-200q0,-17 11.5,-28.5T640,560q17,0 28.5,11.5T680,600v200q0,17 -11.5,28.5T640,840ZM800,840q-17,0 -28.5,-11.5T760,800v-360q0,-17 11.5,-28.5T800,400q17,0 28.5,11.5T840,440v360q0,17 -11.5,28.5T800,840ZM560,479q-16,0 -30.5,-6T503,456L400,353 188,565q-12,12 -28.5,11.5T131,564q-11,-12 -10.5,-28.5T132,508l211,-211q12,-12 26.5,-17.5T400,274q16,0 31,5.5t26,17.5l103,103 212,-212q12,-12 28.5,-11.5T829,189q11,12 10.5,28.5T828,245L617,456q-11,11 -26,17t-31,6Z" />
|
||||
|
||||
</vector>
|
||||
13
app/src/main/res/drawable/monitoring_filled.xml
Normal file
13
app/src/main/res/drawable/monitoring_filled.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:tint="#000000"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M160,853q-22,0 -37.5,-15.5T107,800v-45q0,-22 15.5,-37.5T160,702q22,0 37.5,15.5T213,755v45q0,22 -15.5,37.5T160,853ZM320,853q-22,0 -37.5,-15.5T267,800v-185q0,-22 15.5,-37.5T320,562q22,0 37.5,15.5T373,615v185q0,22 -15.5,37.5T320,853ZM480,853q-22,0 -37.5,-15.5T427,800v-125q0,-22 15.5,-37.5T480,622q22,0 37.5,15.5T533,675v125q0,22 -15.5,37.5T480,853ZM640,853q-22,0 -37.5,-15.5T587,800v-205q0,-22 15.5,-37.5T640,542q22,0 37.5,15.5T693,595v205q0,22 -15.5,37.5T640,853ZM800,853q-22,0 -37.5,-15.5T747,800v-365q0,-22 15.5,-37.5T800,382q22,0 37.5,15.5T853,435v365q0,22 -15.5,37.5T800,853ZM560,487q-20,0 -39.5,-8T485,456l-85,-85 -203,203q-16,16 -38,15.5T122,573q-15,-16 -14.5,-37.5T123,499l202,-202q16,-16 35.5,-23.5T400,266q20,0 40,7.5t35,23.5l85,85 203,-203q16,-16 38,-15.5t37,16.5q15,16 14.5,37.5T837,254L635,456q-15,15 -35,23t-40,8Z" />
|
||||
|
||||
</vector>
|
||||
Reference in New Issue
Block a user