Adam Powell
05/21/2019, 3:39 PM@Composable
functions can only be called from other @Composable
functions - yes, we don't want that pollution either 🙂orangy
suspend
function, let’s imagine for a moment we are doing an “incremental structure updates” plugin to the language, and let’s pretend we can have a (soft) keyword. In the true Kotlin spirit, we should be able to develop libraries and frameworks, and not just UIs. Like if we have compose fun Data(name: String)
, then where the composition context comes from, how do you scope different DSLs belonging to different systems, etc. These are open questions, and they are probably out of scope of this very specific use case, but I find it interesting thinking about it and it would be nice to see what you folks think here.napperley
05/21/2019, 11:11 PM// ...
StoryWidget {
story = StoryData
Clickable {
onClick = onClick
Padding {
amount = 8.dp
Column {
Title { txtContent = story.title }
Image { src = story.image }
Text { txtContent = story.content }
}
}
}
}
Pedro Gomez
05/22/2019, 6:38 AMHowever, this is not part of the repository right now and we will have to wait until a new release in order to check if the suggested implementation looks like this or not.If nobody documents how the library is implemented the only thing I can find is questions around. I'm not judging anybody. I'm really sorry if you or your team feel bad because of my blog post. I didn't mean to hurt you or your team feelings. I already told Adam and the whole team I think you are doing it great with compose and as I said in my blog post:
The Android team is doing it great. Believe me when I say that this Compose API is way better than the current state of the art of Android development.During the Google IO talk the team said "go to the repo and play with compose" and that's what I did. After playing with compose and the available documentation I wrote the post. if compose has an API that is not documented or used in the example provided, I'm afraid I can't review it. If you have examples of things that don't match what I explained in the blog post I'll add a note with the resources you provide me. I hope these resources will be part of the documentation soon.
Leland Richardson [G]
05/22/2019, 7:24 PMGil Goldzweig
05/23/2019, 6:07 AMgildor
05/23/2019, 6:10 AMGil Goldzweig
05/23/2019, 6:16 AMAntanas A.
05/23/2019, 2:15 PMChuck Jazdzewski [G]
05/23/2019, 4:47 PMKey
) if Item
uses a @Pivotal
parameter such as,
fun Item(@Pivotal item: DataItem) {
...
}
then calls to Item
automatically track the value of item
.uli
05/23/2019, 5:01 PMsource location
in unique to the source location of the call site.
in the blog, and in your explanation the meaning of source property
in you introduce a key that is combined with the source property to introduce a group specific key.
Fudge
05/24/2019, 6:29 AMappBar
parameter of Scaffold
only accept "a component of type appBar"Miguel Vargas
05/24/2019, 7:38 PMText ("Hello World")
instead of Text (R.string.hello_world)
Leland Richardson [G]
05/24/2019, 9:50 PMLeland Richardson [G]
05/24/2019, 9:57 PMfun composition() {
Column {
Text("Hello")
Image("<https://image>")
repeat(2) { Text("Hello") }
}
}
Jacob Applin
05/24/2019, 10:00 PMfun composition() {
Column(
Text(HeaderText, "Hello"),
Image("<https://image>", Size(Material, Material)),
*Array(2) { Text("Hello") },
Button(Primary),
Button(Secondary)
)
}
Jacob Applin
05/24/2019, 10:02 PMFudge
05/25/2019, 6:51 AMTextField
. And then I want to make a version of that that validates text input named ValidatedTextField
.
I would now need to copy paste the possibly extremely long declaration of TextField
, as part of the declaration of ValidatedTextField
, and then feed all of these parameters into TextField
, and then every time TextField
adds new arguments I need to add those to ValidatedTextField
.romainguy
05/25/2019, 7:27 AMfun ValidateTextField(foo: Bar, @ParamsOf<TextField> p)
Gil Goldzweig
05/28/2019, 5:25 AMFudge
05/30/2019, 7:05 AMmainAxisSize
, mainAxisAlignment
, etc ints instead of enums?Fudge
05/31/2019, 8:44 AMLayout(children = {Text("Hello")}, layoutBlock = { measurables, incomingConstraints ->
val sizeOfTheHelloText = /*calculate size*/
Draw {
/* draw some special border around the text */
}
}
Or
OnChildPositioned(onPositioned = { coords->
Draw {
/* draw some special border around the text */
}
}) {
Text("Hello")
}
The problem lies in Draw
, as 'there is no composition context' there. Getting the size of the text I managed to figure out how to do.
For context, I'm trying to make a button that fills up like a progress bar.Fudge
05/31/2019, 11:45 AMmoetouban
05/31/2019, 10:16 PMhot reload
feature supported with compose just like in flutter or react ? One of downside of compose is that you can't visualize your UI anymore.louiscad
06/03/2019, 9:23 AMAntanas A.
06/03/2019, 11:04 AMAntanas A.
06/03/2019, 11:07 AMjw
06/03/2019, 4:36 PMRobert Menke
06/03/2019, 7:16 PMJurriaan Mous
06/03/2019, 7:17 PM