Last active
November 22, 2021 18:59
-
-
Save arildojr7/f6fde329c80baf585242426abcf21571 to your computer and use it in GitHub Desktop.
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 TunerScreen(tunerState: TunerState) { | |
Column( | |
modifier = Modifier.fillMaxSize().background(tunerState.bgColor), | |
verticalArrangement = Arrangement.Center, | |
horizontalAlignment = Alignment.CenterHorizontally | |
) { | |
Row(verticalAlignment = Alignment.CenterVertically) { | |
LeftArrow(isVisible = tunerState is TunerState.Down) | |
TextNote(note = tunerState.note.title) | |
RightArrow(isVisible = tunerState is TunerState.Up) | |
} | |
} | |
} | |
@Preview(widthDp = 200, heightDp = 200) | |
@Composable | |
fun TunedView() = TunerScreen(TunerState.Tuned(NotesEnum.A)) | |
@Preview(widthDp = 200, heightDp = 200) | |
@Composable | |
fun OutOfTuneViewDown() = TunerScreen(TunerState.Down(NotesEnum.A)) | |
@Preview(widthDp = 200, heightDp = 200) | |
@Composable | |
fun OutOfTuneViewUp() = TunerScreen(TunerState.Up(NotesEnum.A)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment