Last active
June 26, 2021 15:26
-
-
Save sergenes/801626c29ade9d646a3b739ab62044e7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
data class StudyCard( | |
val index: Int, | |
val frontVal: String, | |
val backVal: String, | |
val frontLang: String = "English", | |
val backLang: String = "English" | |
) | |
private val colors = arrayOf(primaryColor, secondaryColor, tertiaryColor) | |
private fun calculateScale(idx: Int): Float { | |
return 1f - idx * (1f / 10f) | |
} | |
private fun calculateOffset(idx: Int): Int { | |
return (paddingOffset * (idx + 1)).toInt() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment