Colton Idle
10/25/2021, 6:48 PMFatal Exception: java.lang.IllegalAccessError: Method 'void android.view.View.onAnimationEnd()' implementing interface method 'void coil.target.Target.onAnimationEnd()' is not public (declaration of 'androidx.compose.ui.platform.AndroidComposeView' appears in /data/app/~~D83UUWaeF7V8xBltnyPXpw==/base.apk)
natario1
10/25/2021, 7:57 PMSubcomposeLayoutState.maxSlotsToRetainForReuse
is supposed to do? I have a LazyList-like component where only some children are subcomposed and I'm playing with this value, but I fail to see any effect. What's the metric I should be looking at?Mikołaj Kąkol
10/26/2021, 5:20 AMCompositionLocalPressed/Enabled
would be a good idea?
My main problem is how to change font color based on those states and I’m bit lazy to pass it to each function.Jason Roberts
10/26/2021, 5:39 AMK Merle
10/26/2021, 9:32 AMInk
10/26/2021, 11:53 AMHatice Sarp
10/26/2021, 12:12 PMripple
transparent from material theme in Compose. When I make it transparent from this theme, ripple does not appear directly on compose. In some places I inflate composable into fragment with ComposeView
. The ripple of the items in the ComposeView is visible. What do you think I should do?Mohammad Sianaki
10/26/2021, 12:27 PMColumn
with many TextField
inside it,
when I tap on the last TextField
the Keyboard opens up and Covers the last TextField
I have set android:windowSoftInputMode="adjustResize"
in manifest but nothing changes.mattinger
10/26/2021, 3:15 PMclhols
10/26/2021, 3:27 PMAnimatedVisibility(enter = slideInVertically()) {}
But the Composable get clipped by the screen height, so you only get to see the top part of it when it animates in. The Composable is scrollable, so my guess is that it is animating using the height of the scroll container and not the content. So I need the full content laid out when animating in but still scrollable afterwards. Any ideas on how to accomplish that?Slackbot
10/26/2021, 3:41 PMChris Fillmore
10/26/2021, 4:52 PMLazyColumn
with around ~75 items, including `stickyHeader`s, inside a bottom sheet, and the performance of LazyListState.animateScrollToItem()
is noticeably bad. The animation is not smooth; it appears to just show a few frames before landing at the target index. Scrolling through the list manually otherwise works well enough.
The items in the list have some state associated with them (they can be “favourited” (via a heart icon) or “toggled” (via a switch). They have other components which are visible (or interactive) conditionally. So they are perhaps relatively complex.
Should I expect animateScrollToItem
to be performant in this case? I’m wondering if others have encountered a similar situation. Thanks for the feedback.Ashu
10/26/2021, 6:40 PMnglauber
10/26/2021, 7:24 PMViewModelStoreOwner
of a hiltViewModel()
? 😛
Let’s say the user is in ScreenA
and navigate to ScreenB
. In ScreenB
, I’m creating a viewmodel using hiltViewModel()
. So, the scope of this viewmodel is ScreenB
.
Now, from ScreenB
, I want to open ScreenC
, pop ScreenB
(therefore, the stack is ScreenA
and ScreenC
), but reuse the viewmodel created in ScreenB
.
Is it possible? 🤔 (I wouldn’t create the viewmodel in ScreenA
😞)Casey Brooks
10/26/2021, 8:19 PMYASAN
10/26/2021, 9:10 PMVinay Gaba
10/26/2021, 9:22 PMSlackbot
10/26/2021, 11:12 PMChintan Soni
10/27/2021, 5:12 AMMichael Marshall
10/27/2021, 5:22 AMHorizontalPager
and I’ve noticed that doing something like,
val scope = rememberCoroutineScope()
val pagerState = rememberPagerState()
...
Tab (
...
onClick = { scope.launch { pagerState.animateScrollToPage(index) } }
...
)
feels like a bit of an imperative programming anti-pattern compared to declaratively creating an AnimatedContent
as described in the docs.
I assume it’s doing something similar under the hood anyway, and this is just a convenience function, so it’s ok?K Merle
10/27/2021, 7:14 AMjava.lang.NoSuchMethodError: No static method fadeIn$default(FLandroidx/compose/animation/core/FiniteAnimationSpec;ILjava/lang/Object;)Landroidx/compose/animation/EnterTransition; in class Landroidx/compose/animation/EnterExitTransitionKt; or its super classes (declaration of 'androidx.compose.animation.EnterExitTransitionKt'
...
Anyone know what could be the problem?Tolriq
10/27/2021, 8:35 AMval playlistItems by remember { derivedStateOf { playlistContent.toMutableList() } }
I'd like to ignore playlistContent changes in some cases. I can use another variable to store a copy of the actual value and return it, but I wonder if there's something more integrated.Ashu
10/27/2021, 9:33 AMsetContent
equivalent for dialog fragments?YASAN
10/27/2021, 10:25 AMView
on my Composable which I need to init
to show. The init
is a heavy process so I really want to avoid doing it when its not needed.colintheshots
10/27/2021, 2:26 PMcreateComposeRule()
, I seem to be running into an issue where my font family is triggering the following error. This doesn't happen normally when using the app. Why is this only occurring in the test on the first TextStyle passed to the Typography constructor and how can I resolve it? Do I have to provide the font family differently for tests, since it appears that it thinks the FontFamily I defined is null?
Caused by: java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter h4
Colton Idle
10/27/2021, 4:02 PMval myListOfComposables = mutableStateListOf<@Composable () -> Unit>()
This code triggers a lint warning/error that I should remember it.
When I remember it, then I get duplication, seemingly every time it recomposes.
val myListOfComposables = remember { mutableStateListOf<@Composable () -> Unit>() }
Is the lint issue wrong? Or am I doing something wrong?Anton Afanasev
10/27/2021, 4:33 PMkotlin 1.6.0-RC
version?Lucien Guimaraes
10/27/2021, 4:47 PMDanish Ansari
10/27/2021, 5:29 PMLazyColumn
when navigating from screen A to screen B and coming back
Screen A contains 20 items, user scrolled to 15th item, selected 15th item, Screen B opened, came back, list gets reset, scrolled to 1st item
But I want the 15th item to be visiblemattinger
10/27/2021, 7:44 PMdata class UIState(val startTime: Long = System.currentTimeMillis())
class UIStateVM(savedStateHandle: SavedStateHandle): ViewModel() {
private val _uiState = mutableStateOf(UIState())
val uiState: State<UIState> get() = _uiState
}