Gabriel Feo
05/06/2020, 11:19 PMBox
the recommended way of creating simple shapes such as this BottomSheet handle?Val Salamakha
05/07/2020, 1:21 AMSrSouza
05/07/2020, 3:48 AMdagomni
05/07/2020, 2:26 PMBottomNavigationItem(
modifier = Modifier.fillMaxWidth()
+ Modifier.ripple(enabled = false),
alwaysShowLabels = true,
icon = { Icon(vectorResource(item.first)) },
text = { Text(stringResource(item.second)) } },
selected = selectedItem == item,
onSelected = {
println("println statement that is not getting called")
}
)
clhols
05/07/2020, 4:31 PMType 'State<List<MuNowNext>>' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
I don't get that error message. I see State has this extension:
State<T>.getValue(thisObj: Any?, property: KProperty<*>)
An Nothing? is not Any?, so why does it want a Nothing? ?
Code is:
@Composable
fun ChannelsList(channels: LiveData<List<MuNowNext>>) {
val channelsList by channels.observeAsState(initial = emptyList())
manueldidonna
05/08/2020, 2:32 AMVal Salamakha
05/08/2020, 3:52 AMVal Salamakha
05/08/2020, 4:17 AMmanueldidonna
05/08/2020, 8:54 AMBox {
// here doesn't reiceive clicks, but it's visible because it has an higher zindex
HomeToolbar(title = currentBox.name, modifier = Modifier.preferredHeight(56.dp))
VerticalScroller {
Column {
Spacer(modifier = Modifier.preferredHeight(56.dp))
PokemonList(pokemon = pokemonPreviews.value) { slot ->
state.selectedPokemonIndex = slot
}
Spacer(modifier = Modifier.preferredHeight(16.dp))
}
}
// here it's both visible and reiceives clicks
HomeToolbar(title = currentBox.name, modifier = Modifier.preferredHeight(56.dp))
}
dagomni
05/08/2020, 11:07 AMval state = viewModel.currentState.collectAsState(viewModel.getInitialState())
Column(Modifier.fillMaxSize() + Modifier.drawBackground(color = Color.Blue)){
AdapterList(modifier = Modifier.fillMaxSize(), data = state.value.dataList) {
Text(
modifier = Modifier.fillMaxWidth() + Modifier.preferredHeight(80.dp),
text = it.title,
color = Color.White
)
}
}
and gives me a runtime error while executing
LayoutNode@6292b16 children: 1 measureBlocks: MeasuringIntrinsicsMeasureBlocks@a9f8420{ measureBlock=androidx.ui.foundation.BoxKt$Box$1$1@0ed31d9 } is not measured, draw requested
When I remove AdapterList, it runs just fine
EDIT: it's not working when data parameter is an empty listaiidziis
05/08/2020, 11:49 AMFilledTextField
in emulator, it is not possible to move cursor with arrow keys (<- & ->). Is this a known issue?grandstaish
05/08/2020, 7:02 PM'-XXLanguage:+NewInference'
does not work with google’s custom compiler 1.3.70-dev-withExperimentalGoogleExtensions-20200424
Stefan Sturm
05/09/2020, 9:36 AMmanueldidonna
05/09/2020, 12:23 PMmanueldidonna
05/09/2020, 3:06 PMrkeazor
05/09/2020, 3:09 PMcodeslubber
05/10/2020, 4:56 AMdev03
and it still has that stuff in it where kotlin version is a string in the base gradle file and you have to change that according to the app build file but then it is unhappy back in the other file. Seriously build is such a grease fire, it’s never going to be better. Probably one of the reasons Rust is gaining so much popularity… anyway time left for compose? 0carlos cdmp
05/10/2020, 3:55 PMcarlos cdmp
05/10/2020, 5:11 PMRow {
Text("Sample Text")
Button("Click")
}
Is throwing IllegalStateException: No colors found!?passiondroid
05/10/2020, 5:59 PMamar_1995
05/10/2020, 7:10 PMDataTable
in compose is removed. Is there any alternative for that ?kagomez
05/11/2020, 7:22 PMButton(onClick = { state.counter++ }, modifier = Modifier.tag("testTag"))
but on my UiTests the method findByTag is not recognizing the button, any insights on this?Lilly
05/11/2020, 9:17 PMPassword
? This is showing the text still plain:
TextField(
value = textState,
modifier = Modifier.fillMaxWidth(),
onValueChange = onChange,
keyboardType = KeyboardType.Password
)
Lilly
05/11/2020, 9:26 PMMBegemot
05/12/2020, 12:01 PMKazemihabib1996
05/12/2020, 3:26 PMsize
modifiers:
backgroundColor not works in below code:
Box(backgroundColor = Color.Blue, modifier = Modifier.width(200.dp).height(100.dp))
works in below one:
Box(backgroundColor = Color.Blue, modifier = Modifier.size(200.dp))
vanpra
05/12/2020, 4:47 PMZach Klippenstein (he/him) [MOD]
05/13/2020, 2:56 AMCompositionReference
from a composable function, pass it through to a FrameLayout
hosted inside the composition, and have that legacy view pass that reference through to a composable hosted inside itself? I.e. so that any ambients in effect where the legacy view is added to the composition get propagated to the leaf composable inside the legacy view.
I’m doing the naïve thing right now of just having the legacy view call setViewContent
instead of setContent
, which takes a CompositionReference
. However, the leaf composable doesn’t seem to be getting model updates, and throws an `IllegalStateException`: “Unsupported node type LayoutNode” if I try composing something like a Text
.
I’m sure all this infrastructure is full of holes right now, but is this something that’s ideally supposed to work? setViewContent
has a TODO on it to remove, and the only other API that seems relevant here is subcomposeInto
but that requires a ComponentNode
which I haven’t tried to figure out how to get yet.R Brian Amesbury
05/13/2020, 4:44 AMKazemihabib1996
05/13/2020, 2:26 PMstaticAmbientOf
instead of ambientOf
? what's the benefit of using staticAmbientOf
that RippleTheme
for example uses that instead of ambientOf
?Kazemihabib1996
05/13/2020, 2:26 PMstaticAmbientOf
instead of ambientOf
? what's the benefit of using staticAmbientOf
that RippleTheme
for example uses that instead of ambientOf
?Adam Powell
05/13/2020, 2:37 PMstaticAmbientOf
has lower overhead but if it ever changes in place, we will invalidate and recompose the entire subhierarchy below the Providers
where it changed, since we don't track precise location of reads for static ambients.State<T>
that holds the "real" value of the ambientState<T>
instance from the Providers
in the composition stays constant and never changes, only the observable value changes when you provide a new value for the ambient key.Kazemihabib1996
05/13/2020, 2:47 PMstaticAmbientOf
for RippleTheme
as in most applications developers set that one time and won't change it later?Chuck Jazdzewski [G]
05/13/2020, 4:39 PMstaticAmbientOf
for ambients that are unlikely to ever change or if they do change they likely invalidate the entire tree anyway. Here, change is defined as changing the value provided at the point it is provided. If a static ambient is re-provided, it is not counted as being changed and will not invalidate the tree below it, the tree below just sees a different value than the tree above.