Update app name, fix title text alignment
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,6 +1,8 @@
|
|||||||
*.iml
|
*.iml
|
||||||
.gradle
|
.gradle
|
||||||
.idea
|
.idea
|
||||||
|
.kotlin
|
||||||
|
build
|
||||||
/local.properties
|
/local.properties
|
||||||
/.idea/caches
|
/.idea/caches
|
||||||
/.idea/libraries
|
/.idea/libraries
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/app_name"
|
|
||||||
android:theme="@style/Theme.Pomodoro">
|
android:theme="@style/Theme.Pomodoro">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import androidx.compose.foundation.layout.Column
|
|||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.material3.CircularProgressIndicator
|
import androidx.compose.material3.CircularProgressIndicator
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
|
import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
|
||||||
@@ -100,7 +100,7 @@ fun TimerScreen(
|
|||||||
color = colorScheme.onPrimaryContainer
|
color = colorScheme.onPrimaryContainer
|
||||||
),
|
),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.width(200.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
TimerMode.SHORT_BREAK -> Text(
|
TimerMode.SHORT_BREAK -> Text(
|
||||||
@@ -112,7 +112,7 @@ fun TimerScreen(
|
|||||||
color = colorScheme.onTertiaryContainer
|
color = colorScheme.onTertiaryContainer
|
||||||
),
|
),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.width(200.dp)
|
||||||
)
|
)
|
||||||
|
|
||||||
TimerMode.LONG_BREAK -> Text(
|
TimerMode.LONG_BREAK -> Text(
|
||||||
@@ -124,7 +124,7 @@ fun TimerScreen(
|
|||||||
color = colorScheme.onTertiaryContainer
|
color = colorScheme.onTertiaryContainer
|
||||||
),
|
),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.width(200.dp)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -152,7 +152,6 @@ fun TimerScreen(
|
|||||||
strokeWidth = 16.dp,
|
strokeWidth = 16.dp,
|
||||||
gapSize = 16.dp
|
gapSize = 16.dp
|
||||||
)
|
)
|
||||||
// Box {
|
|
||||||
Text(
|
Text(
|
||||||
text = uiState.timeStr,
|
text = uiState.timeStr,
|
||||||
style = TextStyle(
|
style = TextStyle(
|
||||||
@@ -161,10 +160,9 @@ fun TimerScreen(
|
|||||||
fontSize = 76.sp,
|
fontSize = 76.sp,
|
||||||
letterSpacing = (-2).sp
|
letterSpacing = (-2).sp
|
||||||
),
|
),
|
||||||
|
textAlign = TextAlign.Center,
|
||||||
maxLines = 1
|
maxLines = 1
|
||||||
// autoSize = TextAutoSize.StepBased(stepSize = 24.sp)
|
|
||||||
)
|
)
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||||
@@ -237,7 +235,7 @@ fun TimerScreen(
|
|||||||
@Composable
|
@Composable
|
||||||
fun TimerScreenPreview() {
|
fun TimerScreenPreview() {
|
||||||
val uiState = UiState(
|
val uiState = UiState(
|
||||||
timeStr = "08:34", nextTimeStr = "5:00"
|
timeStr = "03:34", nextTimeStr = "5:00", timerMode = TimerMode.SHORT_BREAK
|
||||||
)
|
)
|
||||||
TimerScreen(uiState, { 0.3f }, {}, {})
|
TimerScreen(uiState, { 0.3f }, {}, {})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Pomodoro</string>
|
<string name="app_name">Tomato</string>
|
||||||
</resources>
|
</resources>
|
||||||
Reference in New Issue
Block a user