Tgo1014
07/29/2021, 9:25 AMdimsuz
07/29/2021, 9:48 AMLayout(content = { leftSlot(); centerSlot(); rightSlot(); }) { measurables, constraints -> ... }
And layout logic is based on the assumption that I'll have 3 measureables: for example I want to always expand centerSlot
. But I've found that if a centerSlot()
composable will not emit any UI (return Unit), I'll have measurables.size == 2
, and also I won't know which one of them is missing.
For now I solved this by wrapping each slot in a box (e.g. Box { leftSlot() }
), but I'm not sure if this is the best way.fuhao
07/29/2021, 10:17 AMImage
sometimes can't load Uri? This Uri(<content://xxx>
) can be loaded by Glide
but can't be loaded by Coil
. The coil only show white screen. And when they load android.resource:// xxxx
, both of them can show picture.Can
07/29/2021, 10:24 AMTin Tran
07/29/2021, 10:37 AMPeter Marogna
07/29/2021, 10:48 AMAndroidView
to be able to render them on the map.
It appears that some modifiers are interpreted differently during the transformation and for example `clip`ping is ignored as you can see in the image. (However using the background
modifier with a Shape
is working, but it isn't a full solution for the problem.)
Did anyone try this before? Any other solution ideas on how to put Composables on Google Maps?Rafs
07/29/2021, 11:16 AMDraggableCircle
is not getting composed with the updated position received from the lambda.
@Composable
fun DraggableSample() {
Box(
modifier = Modifier
.fillMaxSize()
) {
var position by remember { mutableStateOf(IntOffset.Zero) }
DraggableCircle(position = position, onPositionChanged = { position = it })
}
}
@Composable
fun DraggableCircle(
modifier: Modifier = Modifier,
position: IntOffset,
onPositionChanged: (position: IntOffset) -> Unit
) {
Box(
modifier = modifier
.offset { position }
.size(100.dp)
.background(color = Color.Green, CircleShape)
.pointerInput(Unit) {
detectDragGestures { change, dragAmount ->
onPositionChanged(dragAmount.toIntOffset + position)
change.consumeAllChanges()
}
}
)
}
Marcello Galhardo
07/29/2021, 11:29 AMVitaliy Zarubin
07/29/2021, 12:30 PMAlexander Sitnikov
07/29/2021, 2:10 PMUtkarsh Tiwari
07/29/2021, 2:13 PMOdin
07/29/2021, 2:14 PMjava.lang.AssertionError: Activity never becomes requested state "[RESUMED, CREATED, STARTED, DESTROYED]" (last lifecycle transition = "PRE_ON_CREATE")
I saw that someone here had this problem before and solved it by adding a ComponentActivity in their manifest, but I just get the same result. Has anyone here had the same experience? 😄 🤔MaxUt
07/29/2021, 2:28 PMmattinger
07/29/2021, 2:37 PMTash
07/29/2021, 3:00 PMLandry Norris
07/29/2021, 3:04 PMalorma
07/29/2021, 3:49 PMFunkyMuse
07/29/2021, 4:53 PMandroidx.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.0) expects a minimum runtime version of 1.0.0. The version of the runtime on the classpath currently is 1.0.0-rc01.
Fanilog
07/29/2021, 5:43 PMDisposableEffect
inside a composable used by a LazyList in the case the items are reused?
🙏Csaba Kozák
07/29/2021, 6:09 PMMapView
.
I am trying to move the camera as the user is sliding up a bottom sheet.
The problem is that if i change the camera position according to the offset with GoogleMap.moveCamera()
, the maps moves really laggy.
Calling GoogleMap.setPadding()
is smooth though. Can anyone help me with this? Thanks in advance!Colton Idle
07/29/2021, 6:41 PM@Composable
fun ForgotPasswordScreen(successEvent: () -> Unit, vm: ForgotPasswordScreenViewModel){
...
~buttonOnClick {
vm.makeNetworkCall(successEvent)
}
...
}
2. successEvent: () -> Unit, is a navigational event that takes me back to SignInScreen
3. ForgotPasswordScreenViewModel has fun makeNetworkCall(onNetworkCallCompletedSuccessfully: () -> Unit)
and on completion of the network call, if (call.isSuccessful) successEvent()
When I throttle the network call (for testing) it takes like 10 seconds, and I background the app, wait 20+ seconds... and I come back in the app, I can see that the app navigated successfully and the SignInScreen is showing. I guess I was wrong in thinking that the successEvent() wouldn't have any action since the app was backgrounded?Ink
07/29/2021, 7:00 PM@Composable
fun SearchBar(label: String) {
RateMeAppTheme(isSystemInDarkTheme()) {
Row(
modifier = Modifier
.fillMaxWidth()
.wrapContentHeight()
.background(MaterialTheme.colors.onBackground)
.clip(RoundedCornerShape(20.dp))
.padding(20.dp)
) {}
}
}
but I get rectangle max width without rounded corners. Why?K Merle
07/29/2021, 7:03 PMShakil Karim
07/29/2021, 10:11 PMColton Idle
07/30/2021, 12:51 AMnonameden
07/30/2021, 4:31 AMval transition = rememberInfiniteTransition()
val value = transition.animateFloat(
0.5f,
1f,
infiniteRepeatable(
repeatMode = RepeatMode.Reverse,
animation = tween(
durationMillis = 650,
delayMillis = 160,
easing = BezierEasing
)
)
)
it applies delay on each iterate, is there any legit way to delay only first iterate? like startDelay in ValueAnimator?iamthevoid
07/30/2021, 4:40 AMlogin?authorized=true
) then later when i extract it from navigation arguments (Bundle) it appear there as String
but not an as Boolean
. It is a bug or feature? How can i pass Boolean
between nav destinations without converting?Abhishek Dewan
07/30/2021, 7:03 AMBrett May
07/30/2021, 7:57 AM@Published var meInformation : Me? {
didSet {
print("MeInformation changed: \(meInformation)")
}
}
This doesn’t compile for me: (unresolved reference: by)
class AuthenticatedUser(val context: Context) : ViewModel() {
var meInformation: MutableState<MeInformation?> = mutableStateOf(null) by Delegates.observable("<no name>") {
prop, old, new ->
println("$old -> $new")
}
}
I’m not sure if it matters (being new to Kotlin), but meInformation is a @Serializable objectNabeel
07/30/2021, 9:10 AMNabeel
07/30/2021, 9:10 AMVitaliy Zarubin
07/30/2021, 9:16 AMNabeel
07/30/2021, 9:18 AM