Skip to content

Instantly share code, notes, and snippets.

View gabrielbmoro's full-sized avatar
🏠
Working from home

Gabriel Bronzatti Moro gabrielbmoro

🏠
Working from home
View GitHub Profile
@gabrielbmoro
gabrielbmoro / run-mkdocs.bash
Last active November 8, 2025 14:20
Executar mkdocs no root de qualquer projeto do CodandoTV
#!/bin/bash
# Criar o ambiente Python
python3 -m venv venv
# Abrir o ambiente python
source venv/bin/activate
# Instale o mkdocs-material caso você não tenha instalado nesse env
pip install mkdocs-material
@gabrielbmoro
gabrielbmoro / QuizReport.kt
Created March 10, 2023 18:46
AccessibilityArticle8
@Composable
fun QuizReport(
rightAnswersValue: String,
totalQuestionsValue: String,
modifier: Modifier = Modifier
) {
val description = stringResource(
R.string.score_report_content_description,
totalQuestionsValue,
rightAnswersValue
@gabrielbmoro
gabrielbmoro / BasicText.kt
Created March 10, 2023 18:45
AccessibilityArticle7
BasicText(
text = text,
Modifier
.padding(
vertical = 40.dp,
horizontal = 30.dp
)
.semantics {
this.text = AnnotatedString(description)
},
@Composable
fun PageIndicator(modifier: Modifier = Modifier, amountOfIndicators: Int, step: Int) {
val description = stringResource(
R.string.page_indicator_description,
amountOfIndicators,
step + 1
)
Row(
// parte adicionada
@gabrielbmoro
gabrielbmoro / PageIndicator.kt
Created March 10, 2023 18:43
AccessibilityArticle5
// 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)
@gabrielbmoro
gabrielbmoro / modifier.kt
Created March 10, 2023 18:43
AccessibilityArticle4
val modifier = Modifier
.fillMaxWidth(2f)
.clip(CircleShape)
.background(answerState.backgroundColor)
.padding(8.dp)
.toggleable(
enabled = isAnswerSelectionEnabled,
role = Role.RadioButton,
onValueChange = {
attemptCallback(answer)
@gabrielbmoro
gabrielbmoro / modifier.kt
Created March 10, 2023 18:42
AccessibilityArticle3
val modifier = Modifier
.fillMaxWidth(2f)
.clip(CircleShape)
.background(answerState.backgroundColor)
.padding(8.dp)
.toggleable(
enabled = isAnswerSelectionEnabled,
role = Role.RadioButton,
onValueChange = {
attemptCallback(answer)
@gabrielbmoro
gabrielbmoro / Card.kt
Created March 10, 2023 18:41
AccessibilityArticle2
Card(
modifier = modifier
.height(120.dp)
.width(200.dp)
.clip(RoundedCornerShape)
.clickable(
onClick = clickEvent,
role = Role.Button,
onClickLabel = "Acessar"
),
@gabrielbmoro
gabrielbmoro / Card.kt
Created March 10, 2023 18:40
AccessibilityArticle
Card(
modifier = modifier
.height(120.dp)
.width(200.dp)
.clip(RoundedCornerShape)
.clickable(
onClick = clickEvent
),
backgroundColor = backgroundColor
) {
@gabrielbmoro
gabrielbmoro / PieChart.kt
Last active March 12, 2023 00:39
PieChart example using compose
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.*