Utkarsh Tiwari
01/26/2021, 3:31 AMModalBottomSheetLayout
, however, when I state.show()
the modal, it expands to only cover half the screen height. I have to swipe-up to pull it to make it expand to cover the entire screen. What did I miss?Piotr Prus
01/26/2021, 4:10 PMBottomSheetScaffold
. Is it a right component to use here? I put my detail data in sheetContent
and mapView in bodyContent
. Any idea how to deal with it?
example behaviour: https://streamable.com/balbxDirk Hoffmann
01/26/2021, 10:36 PMIcon(Icons.Filled...)
kotlin 1.4.21-2
compose 0.3.0-build143
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.icons.Icons
...
IconButton(onClick = { /* doSomething() */ }) {
Icon(Icons.Filled.Lock)
}
None of the following functions can be called with the arguments supplied:
public fun Icon(bitmap: ImageBitmap, contentDescription: String?, modifier: Modifier = ..., tint: Color = ...): Unit defined in androidx.compose.material
public fun Icon(painter: Painter, contentDescription: String?, modifier: Modifier = ..., tint: Color = ...): Unit defined in androidx.compose.material
public fun Icon(imageVector: ImageVector, contentDescription: String?, modifier: Modifier = ..., tint: Color = ...): Unit defined in androidx.compose.material
any ideas?Kshitij Patil
01/27/2021, 4:44 AMChethan
01/27/2021, 4:56 AMJason Ankers
01/27/2021, 6:53 AMallan.conda
01/27/2021, 7:05 AMjulioromano
01/27/2021, 7:39 AMandroid:animateLayoutChanges="true"
?allan.conda
01/27/2021, 11:51 AMKshitij Patil
01/27/2021, 12:30 PMModifier.navigationBarsWithImePadding()
or Modifier.imePadding()
from accompanist-insets
does not apply to ConstraintLayout
. Is this a bug or am I doing something wrong?
Compose: 1.0.0-alpha10
accompanist: 0.4.2
Francois Morvillier
01/27/2021, 2:35 PMKshitij Patil
01/27/2021, 2:51 PMOnValueChange
event even with no change in its Text. Is this expected behaviour?Kshitij Patil
01/27/2021, 4:24 PMOffsetMapping
for VisualTransformation
but this isn’t available for the use-case I mentioned.Marko Novakovic
01/27/2021, 5:57 PMReading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied
grandstaish
01/27/2021, 6:55 PMdetectTapGestures
might not detect taps when there’s an ongoing animation on the screen? I have a separate pointerInput
modifier that just logs input events, and both the down&up events are being logged. Once the animation completes, taps are detected fine again. I also added a log to check that my composable wasn’t being re-composed on every frame of the animation, but it doesn’t seem to be 🤔krzysztof
01/27/2021, 7:53 PMPreview
to show up - It worked previously (version alpha07
), now with alpha08
from androidx.compose.ui:ui-tooling
is giving me error:
androidx.ui.tooling.preview.PreviewActivity is not an Activity subclass or alias
Utkarsh Tiwari
01/28/2021, 2:10 AMKyant
01/28/2021, 2:55 AMchris-horner
01/28/2021, 4:16 AMweight
of an item in a Column
down to 0? Seems a little tricky as weights must have a value greater than 0. Am I missing something?darkmoon_uk
01/28/2021, 4:18 AM@Compose
-ing views that are dependent on bundled resources at runtime; so these fail during preview.
Is there a way I can check whether I'm running in @Preview
mode in the composition, so that I can just put colored block instead of the asset?linus muema
01/28/2021, 7:35 AMBox
like the "Log In" and "Sign Up" buttons below 🤔rsktash
01/28/2021, 7:57 AMjulioromano
01/28/2021, 8:25 AMShakil Karim
01/28/2021, 8:34 AMval viewModel: HomeViewModel = viewModel()
in each screen, Do these ViewModels remain in memory all the time because I'm using a Single Activity? and I'm not using Navigation ComponentDejan Predovic
01/28/2021, 9:55 AMArchie
01/28/2021, 10:10 AMmodifier.layout { measurable, constraints ->
val placeable = measurable.measure(constraints)
val wrapperWidth = placeable.width.coerceIn(constraints.minWidth, constraints.maxWidth)
val wrapperHeight = placeable.height.coerceIn(constraints.minHeight, constraints.maxHeight)
val size = wrapperWidth.coerceAtLeast(wrapperHeight)
layout(size, size) {
placeable.placeRelative(0, 0)
}
}
But I am only altering the position here since I already measured the placeable. Any hints?pawegio
01/28/2021, 11:33 AMkotlinCompilerVersion
in composeOptions
got deprecated in recent android gradle api, IncompatibleComposeRuntimeVersionException
.@Deprecated("")
var kotlinCompilerVersion: String?
Timo Drick
01/28/2021, 1:13 PMLazyColumn {
items(modelList) { item ->
//key(item) { // with key it works fine
Box(Modifier.swipeToRemove(onRemoved = {
modelList.remove(item)
})) {
Item(item = item)
}
//}
}
}
Timo Drick
01/28/2021, 3:04 PMval list = remember(snapshotStateList) {
snapshotStateList.filter { removed.contains(it).not() }
}
Zach Klippenstein (he/him) [MOD]
01/28/2021, 4:59 PMAbstractComposeView
, when creating its composition, looks up the view tree for a CompositionReference
using findViewTreeCompositionReference()
. This seems really neat, since it could enable ComposeView -> AndroidView -> … -> ComposeView
hierarchies to automatically link their compositions. However, as far as I can tell, AndroidView
never actually sets the view tree CompositionReference
from the calling composition on its View
, and this whole mechanism seems to currently only be used to find the WindowRecomposer
.
Would it be feasible for every AndroidView
call to get a CompositionReference
and set it on its View
to support this? Is this sort of automatic linking of compositions across android view subtrees even something that would make sense? If yes, is the AndroidView
wiring planned?
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ComposeView.kt;drc=a32c0003449e3ca6141ef497f0ee2759b41943ba;l=176Zach Klippenstein (he/him) [MOD]
01/28/2021, 4:59 PMAbstractComposeView
, when creating its composition, looks up the view tree for a CompositionReference
using findViewTreeCompositionReference()
. This seems really neat, since it could enable ComposeView -> AndroidView -> … -> ComposeView
hierarchies to automatically link their compositions. However, as far as I can tell, AndroidView
never actually sets the view tree CompositionReference
from the calling composition on its View
, and this whole mechanism seems to currently only be used to find the WindowRecomposer
.
Would it be feasible for every AndroidView
call to get a CompositionReference
and set it on its View
to support this? Is this sort of automatic linking of compositions across android view subtrees even something that would make sense? If yes, is the AndroidView
wiring planned?
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ComposeView.kt;drc=a32c0003449e3ca6141ef497f0ee2759b41943ba;l=176CompositionReference
was composed, and so if that’s still the case then this simple view tree mechanism lacks the ability to push those recompose events down and this wouldn’t work.Adam Powell
01/28/2021, 5:33 PMLeland Richardson [G]
01/28/2021, 5:42 PMZach Klippenstein (he/him) [MOD]
01/28/2021, 7:01 PMAdam Powell
01/28/2021, 7:31 PMVinay Gaba
01/28/2021, 9:27 PMZach Klippenstein (he/him) [MOD]
01/28/2021, 9:29 PMzsperske
02/01/2021, 1:01 AM