Skip to content

Commit

Permalink
Added capital first letter when add task & opt UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Z-Siqi committed Apr 11, 2024
1 parent 0d8f4dd commit 0e51cb4
Showing 3 changed files with 28 additions and 28 deletions.
Binary file modified app/release/app-release.apk
Binary file not shown.
54 changes: 26 additions & 28 deletions app/src/main/java/com/sqz/checklist/ui/MainLayout.kt
Original file line number Diff line number Diff line change
@@ -185,34 +185,6 @@ fun TopBar(
}
}
},
navigationIcon = {
val visible = topBarState.heightOffset >= topBarState.heightOffsetLimit * 0.58
if (topBarState.heightOffset != topBarState.heightOffsetLimit) {
AnimatedVisibility(
visible = visible,
enter = expandHorizontally(
expandFrom = Alignment.CenterHorizontally
) + fadeIn(
initialAlpha = 0.3f
),
exit = slideOutHorizontally() + fadeOut()
) {
Row(
modifier = modifier.padding(top = 8.dp),
verticalAlignment = Alignment.Bottom
) {
Spacer(modifier = modifier.width(10.dp))
Text(
text = topBarContent(week),
maxLines = 1,
fontSize = 22.sp,
color = MaterialTheme.colorScheme.primary,
overflow = TextOverflow.Visible
)
}
}
}
},
actions = {
IconButton(onClick = onClick) {
Icon(
@@ -223,6 +195,32 @@ fun TopBar(
},
scrollBehavior = scrollBehavior
)
val visible = topBarState.heightOffset >= topBarState.heightOffsetLimit * 0.58
if (topBarState.heightOffset != topBarState.heightOffsetLimit) {
AnimatedVisibility(
visible = visible,
enter = expandHorizontally(
expandFrom = Alignment.CenterHorizontally
) + fadeIn(
initialAlpha = 0.3f
),
exit = slideOutHorizontally() + fadeOut()
) {
Row(
modifier = modifier.padding(top = 22.dp, start = 4.dp),
verticalAlignment = Alignment.Bottom
) {
Spacer(modifier = modifier.width(10.dp))
Text(
text = topBarContent(week),
maxLines = 1,
fontSize = 22.sp,
color = MaterialTheme.colorScheme.primary,
overflow = TextOverflow.Visible
)
}
}
}
}

@Composable
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardCapitalization
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
@@ -117,6 +118,7 @@ fun TaskChangeContentCard(
),
cursorBrush = SolidColor(MaterialTheme.colorScheme.onSurfaceVariant),
keyboardOptions = KeyboardOptions(
capitalization = KeyboardCapitalization.Sentences,
imeAction = if (doneImeAction) {
ImeAction.Done
} else ImeAction.Default

0 comments on commit 0e51cb4

Please sign in to comment.