-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
# *symptoms adjustments* ## ♻️ Current situation & Problem #130 ## ⚙️ Release Notes - The title and selection in the symptom dropdown have always been identical on Android. Now, as with iOS, the title is more detailed than the selection - the value adjustments have been made - completed the symptom description ## 📝 Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md). --------- Signed-off-by: Basler182 <[email protected]>
- Loading branch information
Showing
12 changed files
with
256 additions
and
26 deletions.
There are no files selected for viewing
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
89 changes: 89 additions & 0 deletions
89
...c/main/kotlin/edu/stanford/bdh/engagehf/health/symptoms/SymptomsDescriptionBottomSheet.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
package edu.stanford.bdh.engagehf.health.symptoms | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.lazy.LazyColumn | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.text.style.TextAlign | ||
import edu.stanford.bdh.engagehf.R | ||
import edu.stanford.spezi.core.design.component.VerticalSpacer | ||
import edu.stanford.spezi.core.design.theme.Spacings | ||
import edu.stanford.spezi.core.design.theme.SpeziTheme | ||
import edu.stanford.spezi.core.design.theme.TextStyles | ||
import edu.stanford.spezi.core.design.theme.ThemePreviews | ||
|
||
@Composable | ||
fun SymptomsDescriptionBottomSheet() { | ||
LazyColumn( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.padding(Spacings.medium), | ||
horizontalAlignment = Alignment.CenterHorizontally | ||
) { | ||
item { | ||
Text( | ||
text = stringResource(R.string.symptoms_description_title), | ||
style = TextStyles.titleLarge | ||
) | ||
VerticalSpacer() | ||
TitleDescriptionItem( | ||
title = stringResource(R.string.overall_score_title), | ||
description = stringResource(R.string.overall_score_description) | ||
) | ||
TitleDescriptionItem( | ||
title = stringResource(R.string.physical_limits_score_title), | ||
description = stringResource(R.string.physical_limits_score_description) | ||
) | ||
TitleDescriptionItem( | ||
title = stringResource(R.string.social_limits_score_title), | ||
description = stringResource(R.string.social_limits_score_description) | ||
) | ||
TitleDescriptionItem( | ||
title = stringResource(R.string.quality_of_life_score_title), | ||
description = stringResource(R.string.quality_of_life_score_description) | ||
) | ||
TitleDescriptionItem( | ||
title = stringResource(R.string.symptoms_frequency_score_title), | ||
description = stringResource(R.string.specific_symptoms_score_description) | ||
) | ||
TitleDescriptionItem( | ||
title = stringResource(R.string.dizziness_score_title), | ||
description = stringResource(R.string.dizziness_score_description) | ||
) | ||
VerticalSpacer() | ||
} | ||
} | ||
} | ||
|
||
@Composable | ||
fun TitleDescriptionItem(title: String, description: String) { | ||
Column( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.padding(vertical = Spacings.small), | ||
horizontalAlignment = Alignment.CenterHorizontally | ||
) { | ||
Text( | ||
text = title, | ||
style = TextStyles.titleMedium | ||
) | ||
Text( | ||
text = description, | ||
style = TextStyles.bodyMedium, | ||
textAlign = TextAlign.Center | ||
) | ||
} | ||
} | ||
|
||
@ThemePreviews | ||
@Composable | ||
fun SymptomsDescriptionBottomSheetPreview() { | ||
SpeziTheme(isPreview = true) { | ||
SymptomsDescriptionBottomSheet() | ||
} | ||
} |
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
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
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
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
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
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
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
Oops, something went wrong.