docs: add README.md and update form submission logic (#21)
Some checks are pending
Build / build (push) Waiting to run
Some checks are pending
Build / build (push) Waiting to run
This commit updates the README.md with project details, including features, technologies, installation instructions, and project structure. - It also includes a description of the app, features like free-text input, sentiment selection, submitting content to a server, and displaying a Snackbar. - It updates the form submission logic in `App.kt` to delay showing the "Feedback sent" Snackbar by 1 second. Closes #2 Reviewed-on: #21 Co-authored-by: Ben Martin <ben.martin@sky.uk> Co-committed-by: Ben Martin <ben.martin@sky.uk>
This commit is contained in:
parent
063ec7632f
commit
ed227bf2b6
2 changed files with 40 additions and 11 deletions
|
@ -31,6 +31,7 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.text.input.TextFieldValue
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import org.jetbrains.compose.ui.tooling.preview.Preview
|
||||
|
||||
|
@ -85,7 +86,10 @@ fun App() {
|
|||
Button(onClick = {
|
||||
sentiment.value = Sentiment.HAPPY
|
||||
comment = TextFieldValue("")
|
||||
scope.launch { scaffoldState.snackbarHostState.showSnackbar("Feedback sent") }
|
||||
scope.launch {
|
||||
delay(1000)
|
||||
scaffoldState.snackbarHostState.showSnackbar("Feedback sent")
|
||||
}
|
||||
}, modifier = Modifier.padding(8.dp)) {
|
||||
Icon(Icons.AutoMirrored.Filled.Send, contentDescription = "Send")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue