This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun QuizReport( | |
rightAnswersValue: String, | |
totalQuestionsValue: String, | |
modifier: Modifier = Modifier | |
) { | |
val description = stringResource( | |
R.string.score_report_content_description, | |
totalQuestionsValue, | |
rightAnswersValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BasicText( | |
text = text, | |
Modifier | |
.padding( | |
vertical = 40.dp, | |
horizontal = 30.dp | |
) | |
.semantics { | |
this.text = AnnotatedString(description) | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun PageIndicator(modifier: Modifier = Modifier, amountOfIndicators: Int, step: Int) { | |
val description = stringResource( | |
R.string.page_indicator_description, | |
amountOfIndicators, | |
step + 1 | |
) | |
Row( | |
// parte adicionada |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Círculo com suporte pra selecionado e não selecionado | |
@Composable | |
fun Dot(isSelected: Boolean) { | |
Canvas( | |
modifier = Modifier | |
.size(24.dp) | |
.padding(end = 4.dp), | |
onDraw = { | |
val color = if (isSelected) LightBlue else Gray | |
drawCircle(color) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val modifier = Modifier | |
.fillMaxWidth(2f) | |
.clip(CircleShape) | |
.background(answerState.backgroundColor) | |
.padding(8.dp) | |
.toggleable( | |
enabled = isAnswerSelectionEnabled, | |
role = Role.RadioButton, | |
onValueChange = { | |
attemptCallback(answer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val modifier = Modifier | |
.fillMaxWidth(2f) | |
.clip(CircleShape) | |
.background(answerState.backgroundColor) | |
.padding(8.dp) | |
.toggleable( | |
enabled = isAnswerSelectionEnabled, | |
role = Role.RadioButton, | |
onValueChange = { | |
attemptCallback(answer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Card( | |
modifier = modifier | |
.height(120.dp) | |
.width(200.dp) | |
.clip(RoundedCornerShape) | |
.clickable( | |
onClick = clickEvent, | |
role = Role.Button, | |
onClickLabel = "Acessar" | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Card( | |
modifier = modifier | |
.height(120.dp) | |
.width(200.dp) | |
.clip(RoundedCornerShape) | |
.clickable( | |
onClick = clickEvent | |
), | |
backgroundColor = backgroundColor | |
) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.composecharts.ui.widgets | |
import androidx.compose.animation.AnimatedVisibility | |
import androidx.compose.animation.core.AnimationSpec | |
import androidx.compose.animation.core.animateFloatAsState | |
import androidx.compose.animation.core.tween | |
import androidx.compose.animation.fadeIn | |
import androidx.compose.animation.fadeOut | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TimeHelper } from "util/TimeHelper" | |
describe("Time Helper", () => { | |
it("should get total minutes from 3h", () => { | |
const totalMinutes = TimeHelper.getTotalMinutes("3h") | |
expect(totalMinutes).toBe(180) | |
}) | |
it("should get total minutes from 3h 15min", () => { | |
const totalMinutes = TimeHelper.getTotalMinutes("3h 15min") |
NewerOlder