Skip to content

Commit

Permalink
Add missing styling colors
Browse files Browse the repository at this point in the history
  • Loading branch information
zekierciyas committed Feb 9, 2024
1 parent ec7357b commit 1d5f9b8
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
51 changes: 51 additions & 0 deletions app/src/main/java/com/zekierciyas/jitpack_template/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import com.zekierciyas.library.model.MultipleOptionUI
import com.zekierciyas.library.model.QuestionType
import com.zekierciyas.library.model.SingleOptionUI
import com.zekierciyas.library.model.SurveyModel
import com.zekierciyas.library.model.SurveyOutlinedText
import com.zekierciyas.library.model.SurveyText
import com.zekierciyas.library.model.TextOptionUI
import com.zekierciyas.library.view.SurveyScreen

class MainActivity : ComponentActivity() {
Expand Down Expand Up @@ -54,6 +61,50 @@ fun SurveyView() {
)
SurveyScreen(
survey = sampleSurvey,
backgroundColor = Color.White,
singleOptionUI = SingleOptionUI(
questionTitle = SurveyText(
color = Color.DarkGray,
fontWeight = FontWeight.ExtraBold
),
answer = SurveyText(
color = Color.DarkGray,
fontWeight = FontWeight.Medium
),
selectedColor = Color.White,
unSelectedColor = Color.Gray,
borderColor = Color.Gray
),
multipleOptionUI = MultipleOptionUI(
questionTitle = SurveyText(
color = Color.DarkGray,
fontWeight = FontWeight.ExtraBold
),
answer = SurveyText(
color = Color.DarkGray,
fontWeight = FontWeight.Medium
),
checkedColor = Color.Gray,
uncheckedColor = Color.White,
borderColor = Color.Gray
),
textOptionUI = TextOptionUI(
questionTitle = SurveyText(
color = Color.DarkGray,
fontWeight = FontWeight.ExtraBold
),
answer = SurveyText(
color = Color.Gray,
fontWeight = FontWeight.Medium
),
borderColor = Color.Gray,
backgroundColor = Color.White,
surveyOutlinedText = SurveyOutlinedText(
focusedTextColor = Color.DarkGray,
unfocusedContainerColor = Color.White,
focuedLabelColor = Color.DarkGray
)
),
callbackAnswers = {

},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ fun MultipleChoiceQuestion(
verticalAlignment = Alignment.CenterVertically
) {
Checkbox(
colors = CheckboxDefaults.colors(checkedColor = multipleOptionUI.uncheckedColor),
colors = CheckboxDefaults.colors(
checkedColor = multipleOptionUI.uncheckedColor,
checkmarkColor = multipleOptionUI.checkedColor),
checked = answer in selectedAnswers,
onCheckedChange = null,
modifier = Modifier.padding(8.dp)
Expand Down

0 comments on commit 1d5f9b8

Please sign in to comment.