Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
I know that there is an API council request to change Modifier.drawLayer
to Modifier.graphicsLayer` thus dropping the "draw" prefix to the modifier. I think it might be reasonable to rename the following to match the naming of the fields within the layer API:
Introduce the following:
Modifier.drawOpacity -> Modifier.alpha
Modifier.scale,
Modifier.rotateX,
Modifier.rotateY,
Modifier.rotate (maybe rotateZ but maybe drop the Z to keep it simple?)
Modifier.translate
I think it is reasonable to have both Modifier.offset as well as translate with the documentation indicating that translate is more effective for animated use cases. The only concern I have is if we can somehow detect several of these modifiers in a chain would be able to effectively squash them into a single layer, (ex: Modifier.alpha(0.5f).scale(2f).rotate(45) etc.). What do you think?
Description
mvivo@ faced it(his screenshot is in attachment:
"I used a plain ButtonStyle because border in the other implementations cannot be null
This is my button
style = ButtonStyle(
backgroundColor = MaterialTheme.colors().primary,
contentColor = MaterialTheme.colors().onSurface,
shape = RoundedCornerShape(16.dp),
border = if (selected) Border(color = Color.White, width = 2.dp) else null
)
Couldn't use ContainedButtonStyle because it has no border, couldn't use OutlinedButtonStyle because border cannot be null, and neither TextButtonStyle because of all the above"