Ayfri
07/18/2021, 9:15 PM::MyComponent
, I tried to use it in myArray.forEach(::MyComponent)
but it throws an error 🤔Nathan Castlehow
07/19/2021, 3:32 AMKefas
07/19/2021, 4:08 AMIf Compose is not able to infer the stability of a type, annotate the type withHow do we know that compose is able (or not able) to infer the stability of a type?to allow Compose to favor smart recompositions.@Stable
ms
07/19/2021, 6:21 AMHorizontalPager
which has 3 pages, if I use a ModalBottomSheet in 3rd page & show it, I can still scroll to other pages even though the BottomSheet is visible, which is not the behaviour when using layoutsMd. Nazmun Sadat Khan
07/19/2021, 7:05 AMAdib Faramarzi
07/19/2021, 8:27 AMTextField
expose anything related to focus? In other words, how can one be notified of something like isFocused
?Tiago Nunes
07/19/2021, 12:32 PMAdib Faramarzi
07/19/2021, 1:16 PMColton Idle
07/19/2021, 2:13 PMMehdi Haghgoo
07/19/2021, 2:39 PMYuri Drigin
07/19/2021, 2:49 PMRow
but cannot figure out how to do it. For sample I have few texts in Row, but I need truncate the first one for sample, not the last
weight
isn’t correct way to do it
Thanksalorma
07/19/2021, 3:29 PMLazyColumn
to have stickyHeader
that overlaps the first item of items
?emmanuelvinas
07/19/2021, 4:44 PMorangy
07/19/2021, 5:09 PMCheckbox
but it doesn’t have a label. Of course, I can make a Row
with checkbox and text, but they won’t be semantically connected (and I need special handling for label tap to toggle checkbox). What is the proper way of making labeled checkbox with accessibility in mind?TheDukerChip
07/19/2021, 6:59 PM@Composable
fun ListOfItems(pagedItems: Flow<PagingData<Item>>) {
val items: LazyPagingItems<Item> = pagedItems.collectAsLazyPagingItems()
LazyColumn {
items(items) { item ->
ItemCard(item)
}
}
}
Problem is scrolled state is not retained when the screen is rotated
Tried with the following
val listState: LazyListState = rememberSaveable(saver = LazyListState.Saver) { LazyListState() }
val scrollState: ScrollState = rememberSaveable(saver = ScrollState.Saver) { ScrollState(0) }
LazyColumn(
modifier = Modifier
.scrollable(scrollState, Orientation.Vertical),
state = listState,
) {}
Still got no luckbrandonmcansh
07/19/2021, 7:23 PMIllegalStateException: Couldn't obtain compiled function body for IrBasedSimpleFunctionDescriptor: FUN FUNCTION_FOR_DEFAULT_PARAMETER name:Column$default visibility:public modality:FINAL <> (modifier:androidx.compose.ui.Modifier?, verticalArrangement:androidx.compose.foundation.layout.Arrangement.Vertical?, horizontalAlignment:androidx.compose.ui.Alignment.Horizontal?, content:@[Composable] @[ExtensionFunctionType] kotlin.Function1<androidx.compose.foundation.layout.ColumnScope, kotlin.Unit>, $mask0:<http://kotlin.Int|kotlin.Int>, $handler:kotlin.Any?) returnType:kotlin.Unit [inline]
Nat Strangerweather
07/19/2021, 7:36 PMColton Idle
07/19/2021, 8:01 PMjava.lang.IllegalArgumentException: navigation destination -2074115716 is not a direct child of this NavGraph
Simple repro code in threadDaniel Burnhan
07/19/2021, 8:36 PMclass MyAppModel: ViewModel{
val loggedInState: Flow<Boolean>
}
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
"SETUP APP MODEL HERE"
val myAppModel= MyAppModel()
setContent {
MyUI(myAppModel)
}
}
}
@Composable
fun MyUI(vm: MyAppModel){
val loggedIn = vm.loggedInState.asLiveData().observeAsState()
when (loggedIn.value){
is true -> DasboardUI()
is false -> AuthUI()
}
}
Now that I have a navgraph. It seems like Ill have to have to observe this state in every path in the navgraph to be able to react to it? Otherwise I could create two separate navigation hosts and have them separate for Authentication workflow and the rest of the app?Jason Inbody
07/19/2021, 11:44 PMjava.lang.IllegalStateException: pending composition has not been applied
imply? I recently copy and pasted some google map code and now I'm getting this errorPhilip Dukhov
07/20/2021, 6:31 AMAbhishek Dewan
07/20/2021, 7:44 AMMichal Jezierski
07/20/2021, 8:56 AMallan.conda
07/20/2021, 10:32 AMTodor Grudev
07/20/2021, 10:47 AMdimsuz
07/20/2021, 11:43 AMrc02
-based composable.
It says it can't inline Box$default
. Is this some known bug or should I report it?
Exception: https://gist.github.com/dimsuz/99c94126807cfa6ca1dc515228a8913aColton Idle
07/20/2021, 1:18 PMTesting
We strongly recommended that you decouple the Navigation code from your composable destinations to enable testing each composable in isolation, separate from the NavHost composable.
What does that last bit mean? Decouple nav code from composables EXCEPT the navHost composable (since there's no real way to decouple that, right?). Just checking because I'm not familiar with the "separate from" terminology.
Mehdi Haghgoo
07/20/2021, 1:49 PMJoey
07/20/2021, 2:22 PMSimon Hardt
07/20/2021, 2:58 PM1.0.0-rc02
(or rc1). it used to with 1.0.0-beta09
. I've tried AGP 7.0.0-beta05
(current studio beta) and 7.1.0-alpha03
(current studio canary). I'm getting the following error. any ideas?Simon Hardt
07/20/2021, 2:58 PM1.0.0-rc02
(or rc1). it used to with 1.0.0-beta09
. I've tried AGP 7.0.0-beta05
(current studio beta) and 7.1.0-alpha03
(current studio canary). I'm getting the following error. any ideas?Abhishek Dewan
07/20/2021, 3:01 PM