mon
02/07/2020, 2:46 PM@Model
so that it stops getting updated when the field it is read from changes?Loránd
02/07/2020, 4:46 PMThierry
02/07/2020, 5:09 PMsindrenm
02/07/2020, 9:34 PM@tools:sample
with tools-provided sample data that are only available in @Preview
Composables and that aren't shipped to the actual builds? 😍
I'd especially like this with regards to image resources. Strings I can hard code in my previews. 🙂Thierry
02/07/2020, 9:34 PMmon
02/08/2020, 4:24 AM@Model
mutations so that the component sees multiple var changes at the same time?sindrenm
02/08/2020, 2:52 PM@Composable
by name in the future, you reckon?Loránd
02/08/2020, 5:28 PMvectorResouce
or stringResource
java.lang.IllegalStateException: Backend Internal error: Exception during code generation
Has anyone had the same issue before?Bruno_
02/08/2020, 9:41 PMCannot convert string value 'JETPACK_COMPOSE' to an enum value of type 'com.android.builder.model.AndroidGradlePluginProjectFlags$BooleanFlag' (valid case insensitive values: APPLICATION_R_CLASS_CONSTANT_IDS, TEST_R_CLASS_CONSTANT_IDS, TRANSITIVE_R_CLASS)
happened to anyone? build itself succeedsLoránd
02/09/2020, 10:48 AMmon
02/09/2020, 1:30 PMNeal Sanche
02/09/2020, 7:24 PM// general purpose observe effect. this will likely be provided by LiveData. effect API for
// compose will also simplify soon.
fun <T> observe(data: LiveData<T>) = effectOf<T?> {
val result = +state<T?> { data.value }
val observer = +memo { Observer<T> { result.value = it } }
+onCommit(data) {
data.observeForever(observer)
onDispose { data.removeObserver(observer) }
}
result.value
}
Ref: https://medium.com/swlh/android-mvi-with-jetpack-compose-b0890f5156accodeslubber
02/09/2020, 7:33 PMThierry
02/09/2020, 9:52 PMMohamed Ibrahim
02/10/2020, 5:15 PMThierry
02/10/2020, 11:13 PMThierry
02/11/2020, 2:01 AMLeland Richardson [G]
02/11/2020, 7:17 PMin range
syntax in a when expression)Paolo Achdjian
02/11/2020, 7:32 PMmolikto
02/12/2020, 2:43 PM@Composable fun Outer(i: Int, onClick: () -> Unit) {
@Composable fun Capturing() {
Text(i.toString())
}
Capturing()
Button(onClick = onClick) {
Text("me " + i)
}
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
Column {
var i by state { 0 }
Outer(i, {
i += 1
})
}
}
it seems nested functions can be defined but they are not working properly, Capturing
is considered not depending on any parameters, so it will not update when recomposeKevin Hester
02/13/2020, 3:05 AMwhen (screen) {
is Screen.Home -> HomeContent()
is Screen.SelectRadio -> BTScanScreen()
// Question: how to get hooks invoked when this screen gets shown/removed?
// i.e. I need to start/stop a bluetooth scan operation. depending on the
// appearance/disappearance of this screen.
}
mon
02/13/2020, 7:31 AM@Model
var outside a @Composable
?Pierfrancesco Gulinelli
02/13/2020, 11:15 AMKevin Hester
02/13/2020, 3:55 PMKevin Hester
02/14/2020, 2:11 AMjolo
02/14/2020, 8:51 AMPadding
composable, but also a modifier LayoutPadding
. When would you use one over the other? Are there plans to deprecate one of them?jolo
02/14/2020, 9:07 AMdev-03
used withOpacity
but that was marked as a hack. Is the Opacity
composable the only way to do it in dev-04
?abbic
02/14/2020, 2:26 PMDrawImage
compose call inside another composable. No issue up until this point but DrawImage
comes up as an unresolved reference. Is the tutorial not up to date?Kevin Hester
02/14/2020, 2:53 PM<com.google.android.gms.common.SignInButton
android:id="@+id/sign_in_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
Is there any way in Compose for me to create View instances as a child of a Compose frame? From looking at the docs, I see https://developer.android.com/reference/kotlin/androidx/compose/adapters/package-summary which sounds interesting, but I'm not sure what the intended usage is?Ian Warwick
02/15/2020, 11:10 AMContainer
, ColoredRect
etc or should something like this be done with low level Canvas
draw routines?