Skip to content

Instantly share code, notes, and snippets.

@LDRAlighieri
Last active January 28, 2023 19:44
Show Gist options
  • Save LDRAlighieri/7c6e228b1a738b758cb46e663c51a83c to your computer and use it in GitHub Desktop.
Save LDRAlighieri/7c6e228b1a738b758cb46e663c51a83c to your computer and use it in GitHub Desktop.
Example of Fiberglass screen items that can be drawn
data class SpacerItem(val height: Int) : FiberglassItem {
override val id: String = UUID.randomUUID().toString()
}
data class TitleItem(val title: String) : FiberglassItem {
override val id: String = title
}
data class LoremIpsumItem(private val words: Int) : FiberglassItem {
val text = LOREM_IPSUM_SOURCE.take(words).joinToString(separator = " ")
override val id: Int = words
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment