seb
01/15/2020, 2:14 PMAdam Powell
01/15/2020, 2:21 PMseb
01/15/2020, 2:42 PMAdam Powell
01/15/2020, 2:51 PMthemePreview
in those examples@Preview("Article screen")
@Composable
fun previewArticle() = themedPreview {
ArticleScreen(post3.id)
}
@Preview
to have special knowledge of it, especially since I'm not even sure what extending that to support other parameterization that doesn't come from us would even look likeseb
01/15/2020, 3:05 PMAdam Powell
01/15/2020, 3:11 PM@Preview
, which would allow for things like dropdown selection, etc. in the preview paneseb
01/15/2020, 3:19 PMAdam Powell
01/15/2020, 3:24 PMandroid.widget.Button
ButtonStyle
object and just have different button composables 😄seb
01/15/2020, 3:26 PMAdam Powell
01/15/2020, 3:47 PMWidget
vs. List<Widget>
there. Since Compose uses the emit style that's not an option. We think the emit style is the right tradeoff since it permits a lot more natural control flow within what is otherwise a familiar kotlin DSL stylePadding(16.dp) {
Text("one")
Text("two")
}
would need to be defined in what it means, and every definition we tried confused some subset of the team or UX study participants. The modifier style is precise; you're passing a configuration parameter to a defined layout node.seb
01/15/2020, 3:58 PMAdam Powell
01/15/2020, 3:59 PMseb
01/15/2020, 3:59 PM