Nat Strangerweather
02/05/2022, 6:12 PMTolriq
02/05/2022, 7:05 PMLaunchedEffect(Unit) {
focusRequester.requestFocus()
keyboardController?.show()
}
Does not work I need to add a delay before the show() but this feels hacky and random value 😞Landry Norris
02/05/2022, 7:59 PMjames
02/06/2022, 1:24 AMnavController.navigate()
?
my use case is that I have a dynamic screen which can be accessed by either tapping through the UI, and it can be nested many levels deep, and my animation for sliding in and out works great there, but this dynamic screen can also be accessed via the hamburger menu, and when it's accessed from there, I want to clear the backstack (which is the easy part) but I also want the transition to be different, because sliding in feels and looks totally wrong there
is this possible? or will I need to create entirely different routes and composable(transition = )
declarations and just use different routes to display the same screen but with alternate transition animations?mattinger
02/06/2022, 4:57 AMRooparsh
02/06/2022, 7:20 AMYASAN
02/06/2022, 11:05 AMelye
02/06/2022, 12:01 PMCrossfade
can do a subset of what AnimateContent
can do? Or does Crossfade
has more to offer that can’t be done by AnimateContent
? (Just curious, why do we need a Crossfade
function specifically, given looks like AnimateContent
can achieve what Crossfade
offers).
More detail in https://stackoverflow.com/questions/71006883/is-jetpack-compose-crossfade-just-a-subset-functionality-of-animatecontent Thanks.galex
02/06/2022, 5:56 PMLazyColumn
and another callback when it becomes invisible? I’m at lost with the side effects… 😕myanmarking
02/06/2022, 7:32 PMskoric
02/06/2022, 9:59 PM280.dp
? So I want width to wrap around letters as you enter them and delete. I've been trying to resolve this for days. It just seems there's no solutions.Tim Malseed
02/07/2022, 1:25 AMtopics/topic1
, or topics/topic1/topics/topic2
. The depth of recursion is undefined.. I’m not sure how to implement this, as implementing a composable for each possible level, e.g. composable(topic/{topicId}/subTopic{subTopicId}/moreSubtopic/{moreSubTopicId}
doesn’t seem practicalZoltan Demant
02/07/2022, 7:37 AMJoan Colmenero
02/07/2022, 8:05 AMAlderson Elliot
02/07/2022, 9:03 AMTin Tran
02/07/2022, 10:13 AMFilip Stanis
02/07/2022, 1:58 PM.replace
that works on TextFieldValue
(takes cursor / selection into account)? I'm trying to have forbidden characters (like @) in my TextField
so I'm just doing .replace("@", "")
inside onValueChange
but this means the cursor will stay on the position of the removed character (i.e. behaves like "insert" key is on). I feel this is simple to solve, but just wanted to check if there's some builtin method I'm missing.mattinger
02/07/2022, 2:17 PMjava.lang.IllegalStateException: ViewTreeLifecycleOwner not found from androidx.constraintlayout.widget.ConstraintLayout{18da14ef V.E...... ......I. 0,0-0,0} at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareViewTreeRecomposer(WindowRecomposer.android.kt:244) at androidx.compose.ui.platform.WindowRecomposer_androidKt.access$createLifecycleAwareViewTreeRecomposer(WindowRecomposer.android.kt:1) at androidx.compose.ui.platform.WindowRecomposerFactory$Companion$LifecycleAware$1.createRecomposer(WindowRecomposer.android.kt:99) at androidx.compose.ui.platform.WindowRecomposerPolicy.createAndInstallWindowRecomposer$ui_release(WindowRecomposer.android.kt:155) at androidx.compose.ui.platform.WindowRecomposer_androidKt.getWindowRecomposer(WindowRecomposer.android.kt:230) at androidx.compose.ui.platform.AbstractComposeView.resolveParentCompositionContext(ComposeView.android.kt:220) at androidx.compose.ui.platform.AbstractComposeView.ensureCompositionCreated(ComposeView.android.kt:227)
Brian Donovan
02/07/2022, 3:00 PMVsevolod Kaganovych
02/07/2022, 3:28 PMBackHandler(!state.isLoading) {}
If I do like this, the back button doesn't work even if the isLoading
variable is false
.Filip Stanis
02/07/2022, 4:42 PMFlow<List<Entity>>
I get from Room into either a SharedFlow
or a StateFlow
seems to prevent it from working (I get the initial list of items from Room, but it never updates). What could be causing this?
(code in first reply)Brian Donovan
02/07/2022, 5:15 PMOG
02/07/2022, 8:59 PMLukasz Burcon
02/07/2022, 9:16 PMModifier.requiredSize(50.dp)
to MyTestComposable
, and I expected that I would override the size with the new value - 50.dp
. And yeah, the size is being modified, but somehow when I try to use MyTestComposable
in a Column it looks like another view is being drawn on top of MyTestComposable
- take a look at the picture attached in thread.
@Composable
private fun MyTestComposable(
modifier: Modifier = Modifier,
) {
Box(
modifier = Modifier
.border(1.dp, Color.Blue)
.requiredSize(25.dp)
.then(modifier) ,
)
}
brabo-hi
02/08/2022, 12:50 AMScaffold
how can we get the TopAppBar
and BottomAppBar
to be transparent and have the body background visible top and bottom?Marcin Wisniowski
02/08/2022, 1:52 AMmaxLines = 5
on a Text
to limit it to 5 lines, but how do I make it always take the space of 5 lines, even if there is less text? I'm looking for a minLines = 5
, if there was one.Ashu
02/08/2022, 7:30 AMWaleed Sarwar
02/08/2022, 8:17 AMelye
02/08/2022, 11:54 AMMutableStateTransition
compare to normal mutableStateOf
has to offer. It’s long to describe here, so I have put the inquiry on StackOverflow https://stackoverflow.com/questions/71033419/whats-the-use-of-mutablestatetransition-looks-like-mutablestateof-does-all-i. Hopes to get some insight from you. Thanks 🙏Marcin Wisniowski
02/08/2022, 1:03 PMelevation
and zIndex
? They seem to affect each other, but I am not sure how exactly.