Jesse Hill
10/07/2022, 9:51 PMhasCompletedOnboarding
state would it be improper to trigger a navigation change to the onboarding
navigation graph from the home
graph based on the given state? The thought would be to use LaunchedEffect
so that the navigation would only happen when the state changed and wouldn’t be explicitly tied to the composition of that composable but that feels like the wrong approach. There is a code example in the thread.Jaime
10/07/2022, 10:14 PMlouiscad
10/08/2022, 3:28 AMimport androidx.compose.material3.MaterialTheme
Use import androidx.compose.material3.Text
in some files
Use import androidx.compose.material.Text
in some other files
Regret your career pathChristoph Wiesner
10/07/2022, 1:55 PMLaunchedEffect(items) {
scrollState.animateScrollToItem(scrollState.layoutInfo.totalItemsCount - 1)
}
Problem I have is that on interaction on the last item (custom view) the last item changes in height bc. it shows more content.
How can I make the scrollview scroll not only to the last item but to the very bottom?
(Note: i cannot use reversedLayout
of LazyList bc. I need to be able to determine firstVisibleItem
(top) for a custom sticky header implementation)trashcoder
10/08/2022, 10:29 AMSlider
and noticed that the onValueChangeFinished
is executed before the onValueChange
event when i do not drag the slider but simply click on a new location:
I/System.out: onValueChangeFinished: 76.77
I/System.out: onValueChange: 15.1843815
when i drag, everything works as expected:
...
I/System.out: onValueChange: 72.501526
I/System.out: onValueChange: 72.402824
I/System.out: onValueChange: 72.451195
I/System.out: onValueChange: 72.36809
I/System.out: onValueChange: 72.342735
I/System.out: onValueChange: 72.66811
I/System.out: onValueChangeFinished: 72.66811
is this a known issue?
EDIT: moved source snippets to thread.ste
10/08/2022, 2:29 PMnestedScroll
to detect whether a child ScrollState
reaches the top, so I can forward the deltas to the parent's DraggableState
(see video). However, the android 12 stretch overscroll effect seems to use the available deltas (which is expected to perform the animation), but it also consumes them, and it causes my nestedScroll
onPreScroll
available
parameter to be very close to zero.
How can I tell the overscroll effect to not the deltas?
(the first clip is how it looks like without the overscroll effect)Aaron Waller
10/08/2022, 2:59 PMIlya Nothen
10/08/2022, 5:27 PMCannot access class 'kotlin.ranges.ClosedFloatingPointRange'. Check your module classpath for missing or conflicting dependencies
There was a similar issue with kotlinx.coroutines but I fixed it by declaring a concrete dependency on it.
My project compiles and runs perfectly, but it is just painful to see red underlined project folder name.
It started happening after some gradle reload and then didn't go away for a week. Tried refreshing caches, straight up deleting ~/.gradle/caches (this was a disaster) but nothing helped.Sebastian Höbarth
10/08/2022, 5:58 PMAnimatedNavHost
. Navigating from overview to detail screen, the overview has this as exitTransition set. So the current screen should just slide out, although when the transition starts, the UI jumps up and then slides out. I can’t figure out where this Jump originates. Does someone have a similar problem and can pinpoint me in the direction what I’m doing wrong? (Attached a video in the thread)
exitTransition = {
when (targetState.destination.route) {
DetailDestination.route -> slideOutOfContainer(
AnimatedContentScope.SlideDirection.Left,
animationSpec = tween(600)
)
else -> null
}
},
FunkyMuse
10/08/2022, 10:43 AMYoung Rock
10/09/2022, 7:18 AMNavController
in the form of CompositionLocal
?nlindberg
10/09/2022, 8:27 AM.animateContentSize()
On something that is aligned bottom in a Box, where sizing animation happens before the placing leaving white space below the item during the content size animation ?Alexandru Hadăr
10/09/2022, 2:28 PMAlejandro Rios
10/09/2022, 4:53 PMStylianos Gakis
10/09/2022, 5:42 PMKotlinLeaner
10/10/2022, 10:14 AMbroadcast receiver
in my composable
function. Is it good idea to create in viewmodel
? I am little bit concern about passing activity/ context
in viewmodel
? Because viewmodel
has greater lifecycle
than composable
. So what is best solution for this?abu naser
10/10/2022, 12:16 PMLazyVerticalStaggeredGrid
from foundation api . here is the link https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/staggeredgrid/package-summary but the problem is even after adding
implementation 'androidx.compose.foundation:foundation-layout:1.2.1'
implementation 'androidx.compose.foundation:foundation:1.2.1'
these two i cant call this compose function . my compose version is 1.2.0 .KotlinLeaner
10/10/2022, 1:08 PM1.1.1
in my project. I am using LocalRippleTheme
like thiszt
10/10/2022, 1:55 PMJakub Wiśniewski
10/10/2022, 2:41 PMComposeView
within my application. I’ve dug trough all the sources and still cannot find the cause od the problem. TLDR version of it is that I have a list with error view on top of it that contains “refresh” button. Clicking it with my internet off (so that the view will appear) makes my app crash with bunch of compose related logs that do not point in any direction such as:
java.lang.ArrayIndexOutOfBoundsException: length=3; index=3 -> ViewGroup
java.lang.IllegalArgumentException: Failed requirement -> androidx.compose.ui.node.MeasureAndLayoutDelegate
java.lang.IllegalArgumentException: Failed requirement -> androidx.compose.ui.platform.AndroidComposeView.notifyLayerIsDirty
java.lang.IllegalStateException: Underflow in restore - more restores than saves
Exception Type: Unknown (SIGSEGV)
What is important to mention is that it only happens on RELEASE version of the App.
I’ve dissected my app and trying to reproduce the issue on fresh repo but I wasn’t able to, yet.
No such problems when I switch to ComponentActivity
instead of Fragment
with ComposeView
as its only view.
I don’t have unusual amount of recompositions either - around 2 for state.
Would appreciate any kind of help, guidance, ideas what might be the source of my problem.Luigi Giustiniani
10/10/2022, 3:45 PMGaurav Tyagi
10/10/2022, 5:19 PMGaurav Tyagi
10/10/2022, 5:19 PMErfannj En
10/10/2022, 3:28 PMSean Proctor
10/10/2022, 7:22 PMTolriq
10/10/2022, 8:32 PMKotlinLeaner
10/10/2022, 8:32 PMSpacer
is not working in simple function?Alex Petitjean
10/10/2022, 10:47 PM@Composable
parameter be marked as @Immutable
?
I've got something like this for controlling what is in a TopAppBar
as part of a `Scaffold`:
private data class MyTopAppBarState(
@StringRes val titleResId: Int,
val actions: (@Composable RowScope.() -> Unit)?,
)
The contents of the actions
Composable lambda are `TextButton`s with onClick
lambdas that would likely reference a ViewModel. I don't know if that matters, but it feels like it might.Radoslaw Juszczyk
10/11/2022, 7:15 AMcreateEmptyComposeRule
then the Activity C comes blank...Michael Elgavi
10/11/2022, 9:08 AMTextAlign.Justify
not working on some devices? Specifically having issues with OxygenOS (Nord CE2 Android 12.0)