dimsuz
11/04/2019, 10:56 AMDrawImage
component name feels a bit weird when used in a declarative framework. It sounds like a command to be executed rather than something describing a component. Following this we should've had DrawText
instead of Text
, no? 🙂
• Column(modifier = ...)
. Here modifier
also feels like a name that is way too generic. I mean isn't each and every argument of Column
component a modifier in some sense (it modifies its behavior/view)? I wish it would be more specific into what exactly it modifieskioba
11/04/2019, 11:04 AMDrawImage
is just a draw callback, just like Draw
that's why the naming. it is better to be placed in a parent with Size. something like this:
WithDensity {
Container(
width = vector.defaultWidth.toDp(),
height = vector.defaultHeight.toDp()
) {
DrawVector(vector)
}
}
dimsuz
11/04/2019, 11:07 AMhard to figure out and split the modifiers correctlyI just started playing, so don't know much about them yet. Same goes for draw callbacks. So this is just a first reaction 🙂
romainguy
11/04/2019, 11:09 AMdimsuz
11/04/2019, 11:11 AMPadding
only to add one. I guess then that modifiers is an alternative solution to simplify this.romainguy
11/04/2019, 11:15 AMdimsuz
11/04/2019, 11:15 AMpavi2410
11/04/2019, 6:51 PMAndrey Kulikov
11/04/2019, 9:48 PMdimsuz
11/05/2019, 11:17 AMDrawImage
-> ImageDrawing
, which is an awful name, but I want to show that it describes UI, it answers the "what is this" question, compared to DrawImage
which answers "what is being done, what to do" question (reads like a command)Andrey Kulikov
11/05/2019, 11:21 AM