Skip to content

Instantly share code, notes, and snippets.

@sergenes
Last active June 26, 2021 15:26
Show Gist options
  • Save sergenes/801626c29ade9d646a3b739ab62044e7 to your computer and use it in GitHub Desktop.
Save sergenes/801626c29ade9d646a3b739ab62044e7 to your computer and use it in GitHub Desktop.
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