Luca Nicoletti
10/26/2019, 11:46 AM@Preview
working on functions with parameters all with default values? That would be greatPierfrancesco Gulinelli
10/26/2019, 1:26 PM@Preview
when i need context object?Kevin Janvier Chinabalire
10/26/2019, 1:39 PMrecyclerview
will fetch data from remote using retrofit .
Can i use it to generate ios app like flutter ?pavi2410
10/26/2019, 2:56 PMandrew
10/26/2019, 3:52 PMSrSouza
10/26/2019, 4:27 PMFredrik Larsen
10/26/2019, 5:18 PM@Composable
is a type similar to suspend
and not an annotation, can we except composable fun foo
? In that case, what about @Preview
? And while we're at it, is the unary plus override going to change? Thank you so much for this massive undertaking. Really exciting times. 🙂ianrumac
10/27/2019, 12:07 PMContainer{
val state = +model{ NetworkImagemodel(bitmap: null); } // this is a @Model annotated data class
glideBitmapReady(src,context) {
state.bitmap = it //this is callback from Glide's onResourceReady
}
onCommit(state) {
println("Loaded)"
}
}
I get a IllegalStateException: Not in a frame
pointing to the change of state model (state.bitmap = it //this is callback from Glide's onResourceReady
)andrew
10/27/2019, 3:33 PMBruno_
10/27/2019, 6:12 PMinterface Foo {
fun foo() =
Stream.of(null) // null or any object
.map { it }
}
e: java.lang.IllegalStateException: Backend Internal error: Exception during code generation
also throws that error when using Flowable.fromIterable
from rxJavaSami Eljabali
10/28/2019, 7:19 AMaudriusk
10/28/2019, 7:54 AMsuspend fun support on IR backend
issue ticket on KT tracker which I can follow? On google issuetracker https://issuetracker.google.com/issues/134993205 this one doesn't have any crossreffengdai
10/28/2019, 8:36 AMViewGroup.setContent
(in Wrapper) and ViewGroup.setViewContent
(in Compose)?nglauber
10/28/2019, 5:09 PMTextField
but it has no background or the bottom line like existing in EditText
. Do you guys know how can I set it?
This is what I’m doing.
TextField(
value = currentPerson.name,
onValueChange = { currentPerson.name = it },
editorStyle = EditorStyle(
textStyle = TextStyle(
fontSize = (16.sp)
)
)
)
Also, I’m trying to add two TextFields
inside a Row
and no luck so far… I’m getting this error:
java.lang.IllegalArgumentException: minWidth 2147483647.ipx should be finite
andrew
10/28/2019, 8:50 PMandrew
10/28/2019, 11:08 PMmatt tighe
10/29/2019, 5:11 AMMihai Hrincescu
10/29/2019, 12:33 PMDrawVector
inside a container or i need to wrap the DrawVector
with another container that gets its dimensions from the vectorAsset
? I feel like I'm missing something.R Brian Amesbury
10/29/2019, 2:14 PMDatabinding
with compose
in my fragments. I am doing this:
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? =
container.apply {
this?.let {
it.setContent {
Text("Compose")
}
}
}
It is failing with this exception: java.lang.IllegalStateException: Views added to a FragmentContainerView must be associated with a Fragment. View androidx.ui.core.AndroidComposeView{99eebb1 VFED..... ......I. 0,0-0,0} is not associated with a Fragment.
The container
that is passed in to onCreateView
is a FragmentContainerView
which I am guessing is the view that is inflated in the activity to host the NavGraph
. How can compose my UI in my fragment, and set it as the content?Michal Bacik
10/29/2019, 4:19 PM@Compose
methods starting with uppercase, when Kotlin has lower-case rules for functions? Kotlin lists exception for factory function creating class of same name, but this is not case of Compose.
And Compose uses upper-case for its functions, and it's even not tagget in IDE with warning, while ordinary functions show correct warning.
https://kotlinlang.org/docs/reference/coding-conventions.html#naming-rulesSrSouza
10/29/2019, 6:57 PM@Model
object MyHomeState {
var isDoingSomething = false
fun turnDoingSomething() {
isDoingSomething = !isDoingSomething
}
}
@Composable
private fun MyHomeContent() {
Padding(32.dp) {
Row {
Button(
style = if(!MyHomeState.isDoingSomething) ContainedButtonStyle() else OutlinedButtonStyle(),
onClick = if(MyHomeState.isDoingSomething) null else MyHomeState::turnDoingSomething
) {
Text("START")
}
WidthSpacer(width = 16.dp)
Button(
style = if(MyHomeState.isDoingSomething) ContainedButtonStyle() else OutlinedButtonStyle(),
onClick = if(!MyHomeState.isDoingSomething) null else MyHomeState::turnDoingSomething
) {
Text("STOP")
}
}
}
}
Bruno_
10/29/2019, 7:34 PMMichal Bacik
10/29/2019, 8:24 PMcurrentComposer
used; this is probably referenced by the Compose plugin as it transforms @Composable functions. (global variables are evil 😉 )
Wouldn't it be better to omit magic code transformations, and follow style of Kotlin coroutines which are implemented purely as library (except of compiler suspend
keyword)? Coroutine builders pass CoroutineScope
as receiver parameter to body of couroutine, and there is no hidden magic behind this, we can study all state of coroutine in debugger.
Instead of global currentComposer
variable, Compose would work on a composer build state as normal reveicer variable into @Composable
function .
Do Compose designers fear that developers would mess with the build state and make more mistakes, or want hide implementation, or what's purpose of this rather complicated implementation wich needs special plugin and reworked Kotlin compiler?Michal Bacik
10/30/2019, 10:35 AMSrSouza
10/30/2019, 2:54 PMMichal Bacik
10/30/2019, 4:43 PMGrigorii Yurkov
10/30/2019, 4:58 PMGrigorii Yurkov
10/30/2019, 7:23 PMjava.lang.ClassCastException: kotlin.Unit cannot be cast to java.lang.Boolean
Michal Bacik
10/30/2019, 7:59 PM@Model
class for this scenario.
@Composable
fun MyRect(){
var color = +memo{ Color.Green }
Clickable(onClick = {
color = Color.Red
}) {
ColoredRect(brush = SolidColor(color), height = 100.dp)
}
}
Michal Bacik
10/30/2019, 9:09 PMMichal Bacik
10/30/2019, 9:09 PMLeland Richardson [G]
10/30/2019, 9:10 PMMichal Bacik
10/30/2019, 9:36 PMActivity
hopefully remains.Leland Richardson [G]
10/30/2019, 9:37 PMromainguy
10/30/2019, 10:23 PMAnna-Chiara Bellini [G]
10/31/2019, 1:57 AM