adjpd
09/05/2021, 10:46 PMRick Regan
09/06/2021, 1:39 AMsystemUiController.setSystemBarsColor()
to set dark icons. When I switch between apps using gesture navigation there is a lag in my test app where the system icons are momentarily white before changing back to black. Is there a way to avoid this? (Video and code in thread.)eygraber
09/06/2021, 4:13 AMinterface Renderer {
fun render()
}
interface ComposeRenderer : Renderer {
@Composable override fun render()
}
will the compose mechanics work correctly if I call render
polymorphically?
class MyActivity : AppCompatActivity {
private val renderer: Renderer = object : ComposableRenderer ...
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent { renderer.render() }
}
}
theapache64
09/06/2021, 8:07 AMTomáš Hubálek
09/06/2021, 8:29 AMSemyon Zadorozhnyi
09/06/2021, 10:07 AMtheapache64
09/06/2021, 11:39 AMe: androidx.compose.compiler.plugins.kotlin.IncompatibleComposeRuntimeVersionException: You are using an outdated version of Compose Runtime that is not compatible with the version of the Compose Compiler plugin you have installed. The compose compiler plugin you are using (version 1.0.2) expects a minimum runtime version of 1.0.0.
Details in 🧵Fredrik Larsen
09/06/2021, 1:04 PMPeter Mandeljc
09/06/2021, 2:21 PMColumn
to have Arrangment.spacedBy()
and Arrangment.Center
at the same time?Rafiul Islam
09/06/2021, 2:35 PMRob
09/06/2021, 2:43 PMmyanmarking
09/06/2021, 4:09 PMdector
09/06/2021, 4:54 PMAkram Bensalem
09/06/2021, 6:34 PMbitkiller
09/06/2021, 6:46 PMАнтон X
09/06/2021, 6:47 PMAkram Bensalem
09/06/2021, 6:57 PMjava.lang.IllegalStateException: Nesting scrollable in the same direction layouts like ScrollableContainer and LazyColumn is not allowed. If you want to add a header before the list of items please take a look on LazyColumn component which has a DSL api which allows to first add a header via item() function and then the list of items via items().
Any help ?Justin Yue
09/06/2021, 9:34 PMmutableStateListOf()
object, which I named days, that holds data class Cell(val text: String, var isSelected: Boolean).
When I want to change the isSelected status, I have to reassign one element to a new Cell with the updated boolean. I would prefer to just reassign one element's isSelected boolean, but that doesn't seem to work. Does anybody know why?Libor Bicanovsky
09/06/2021, 10:39 PMVuLong
09/07/2021, 2:41 AMZoltan Demant
09/07/2021, 4:16 AMLazyListState
(scroll position) between multiple LazyRow
? Ive tried using one rememberLazyListState
but that results in weird scrolling glitches; Im sort of assuming that Ill need to collect all scroll events and update each LazyListState
?Paulo Martins
09/07/2021, 9:26 AMAndroidView
based on my CustomViewModel
changes.
@Composable
fun FilamentViewer(viewModel: CustomViewModel) {
var modelViewer by remember { mutableStateOf<ModelViewer?>(null) }
launchInComposition {
while (true) {
withFrameNanos { frameTimeNanos ->
modelViewer?.render(frameTimeNanos)
}
}
}
AndroidView({ context ->
LayoutInflater.from(context).inflate(
R.layout.filament_host, FrameLayout(context), false
).apply {
val (engine) = scenes[product.material]!!
modelViewer = ModelViewer(engine, this as SurfaceView).also {
setupModelViewer(it)
}
}
})
}
how can I make it change dynamically? I need to update the modelViewer.scene entityAnastasia Rozovskaya
09/07/2021, 10:29 AMJan Skrasek
09/07/2021, 10:44 AMpublic enum class ContentEmphasis { Normal, Minor, Subtle, Disabled }
public val LocalContentEmphasis: ProvidableCompositionLocal<ContentEmphasis> = compositionLocalOf { ContentEmphasis.Normal }
then using it like this
fun Foo(label: @Composable () -> Unit) {
CompositionLocalProvider(LocalContentEmphasis provides ContentEmphasis.Minor) {
label()
}
}
seems that components in label doesn't have the value changed.
Did something changed? Or is my code wrong in some way?Ch8n
09/07/2021, 12:25 PMvitaliy
09/07/2021, 2:04 PMrememberRipple(bounded = false)
. So far it is simply rectangular as a Box
with:
modifier = Modifier
.clickable(
interactionSource = remember { MutableInteractionSource() },
indication = rememberRipple(color = highlightColor),
enabled = enabled,
role = Role.Button,
onClick = onClick
)
.padding( <some paddings> )
I’m running out of ideas and my Compose kung-fu is pretty basic so far. I’ll appreciate any hints you may have for me!adjpd
09/07/2021, 5:07 PMLayout
within a Column
with fillMaxSize()
. The Layout
has two children. I want the second child to tell me its own intrinsic size.
Currently I'm doing measurable.measure(constraints.copy(minWidth = 60, minHeight = 60))
.
But 60
is arbitrary. How can I ask the child to tell me its intrinsic size? (The child is an Icon
within a Surface
)vgonda
09/07/2021, 9:34 PMLauren Yew
09/07/2021, 9:42 PMTopAppBar
? I'm trying to make it auto focus on the title
rather than the navigationIcon
, but none of the focus methods are working. I've tried setting focusOrder
, focusRequester
, using DisposableEffect
to requestFocus. Nothing is working. Talkback always wants to focus first on the navigation icon of the back button. I have a design request to focus on the title THEN the back button.Brad Harris
09/07/2021, 10:45 PMBrad Harris
09/07/2021, 10:45 PMLuis
09/07/2021, 11:57 PMBrad Harris
09/08/2021, 12:00 AMChris Sinco [G]
09/08/2021, 3:02 AMout of the box we don’t have those sweet spring animations that iOS hasOut of the box in iOS == baked into a List control and/or container that has scrolling?
Luis
09/08/2021, 4:54 AMChris Sinco [G]
09/08/2021, 5:52 AMcb
09/08/2021, 6:34 AMModifier.offset(swipeRefreshState.indicatorOffset)
to the list, which should work